138k views
2 votes
Write an algorithm to calculate the sum of integer ​

1 Answer

3 votes

Answer:

Step 1:Start

Step 2: declare a variable and initialize with ‘0’ to store the sum of the number.

Step 3: take input for the number of numbers to be calculated sum of.

Step 4: Loop through the given range and accept inputs or generate numbers.

Step 5: add the current number according to the loop with the present value of the variable declared in (step 3) and store in the same variable

Step 6: print the value of the variable declared in (step 3) with relevant message.

Step 7: Stop

Step-by-step explanation:

User Micha
by
4.3k points