Write a python program to calculate the sum of n-1
Answers
Answered by
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
Math,
15 days ago
Hindi,
1 month ago
Math,
1 month ago
CBSE BOARD X,
9 months ago
History,
9 months ago