Write a program to find sum of number from 1 to 100.

 code:-


sum=0
for i in range(1,101):
sum=sum+i
print(“sum= “,sum)

Output:-


sum= 5050



Leave a Reply

Your email address will not be published.