Computer Science, asked by sanjeet200706, 5 hours ago

algorithm and flow chart to find the sum of a number​

Answers

Answered by harelyquinn
2

Declare a variable n, i and sum as integer; Read number n ; for i upto n increment i by 1 and i=1 { sum=sum+i; } Print sum; Here in this Algorithm we declare 3 variables n for storing the number, i for running the for loop and sum for storing the sum. Read the number n.

Attachments:
Similar questions