Computer Science, asked by manishsairama4250, 1 month ago

Write a python program to calculate the sum of n-1

Answers

Answered by sbmshukla
0

Answer:

n=int(input("Enter Value Of n:"))

Sum=0;

for i in range(0,n-1):

   i=i+1

   Sum=Sum+i

print(Sum)

Explanation:

i'm using for loop from 0 to n-1 number & sum each number till n-1 number.

Similar questions