Computer Science, asked by lpathirana387, 4 days ago

Using flowcharts, write an algorithm to read 100 numbers and then display the sum.

Answers

Answered by navyamahesh22
11

Answer:  

Step 1: Start.

Step 2: Read n, sum, i.

Step 3: Initialize sum=0 and i=0.

Step 4: do (sum=sum+i; i=i+1) while (i<n)

Step 5 : Print sum

Step 6: end

Answered by Jasleen0599
0

Write an algorithm to read 100 numbers and then display the sum.

  1. START
  2. PUBLICLY ANNOUNCE A VARIABLE NAMED COUNT
  3. ANNOUNCE ANOTHER VARIABLE TOTAL
  4. INITIALIZE ADD UP TO ZERO
  5. SUM TO ZERO AT THE OUTSET
  6. PERIOD, REPEAT UNTIL THE COUNT REACHES 100.
  7. ADD ONE MORE TO THE COUNT
  8. DIVIDE BY 2 FOR THE REST OF THE NUMBER
  9. SUM = SUM + COUNT MUST BE COMPLETED IF REMAINDER IS ZERO.
  10. END LOOP
  11. PRESENT THE USER WITH THE VARIABLE SUM'S VALUE
  12. END

#SPJ2

Similar questions