Computer Science, asked by nikitasingh060197, 5 months ago

algorithm to print the sum of first N numbers using iteration​

Answers

Answered by valeriy69
0

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

n = 10

total = 0

for x in range(n + 1):

total += x

print(f"sum: {total}")

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Drake7
0

Answer:

The answer is:

Explanation:

⦿Start

⦿Declare and initialize variable, i,num, s=0.

⦿Enter the value of num i.e. number upto which sum is to be calculated

⦿Use Loop to add number. Any of while, do-while or for loop can be used.

⦿Print the sum

⦿Stop

Please mark me as brainliest.

Similar questions