Summation of a Set of Numbers (संख्याओं के समूह का योग ):-
Question:-
Write an algorithm and flowchart to find the sum of a set of numbers.
संख्याओं के एक समूह का योग ज्ञात करने के लिए Algorithm और Flowchart लिखिए।
Example / उदाहरण -
Suppose the numbers are:- 5, 10, 15, 20, 25
Then:
SUM = 5 + 10 + 15 + 20 + 25
SUM = 75
Algorithm / एल्गोरिथ्म :-
Logic -
SUM = SUM + NUMBER → Adds the current number to the total sum.
i = i + 1 → Increases the counter by 1.
i ≤ N → Checks whether more numbers are left to add.
