InterviewSolution
Saved Bookmarks
| 1. |
Write an algorithm and draw a flowchart to find the sum of first 50 natural numbers |
|
Answer» Solution :step 1: SET COUNT =1, sum =0 step 2: Add the count to sum step 3: INCREASE count by ONE i.ecount =count + 1 step 4: check whether count is 51 step 5: In step 5 if count is 51 display sum else go to step 2 From the flowchart we can observe that there is a loop among the steps (boxes) 3,4 and 5
|
|