#write a program that reads one integer and finds #the sum 1+2+3+...+input_integer #for example, if the input is 5 #the programs outputs: 1+2+3+4+5=15 #input = 10 #1+2+3+..+10 = 55 #1+2+..+n = (n*(n+1)/2) def main(): n = int(input("enter integer ")) sum = 0 counter = 1 while(counter<=n): sum = sum + counter counter=counter+1 print("sum of numbers between 1 and ", n, "is", sum) main()