Search This Blog

Saturday, July 30, 2011

algorithm to find the sum of natural numbers

algorithm to find the sum of natural numbers

ALGORITHM is a prescribed set of well—defined unambiguous rules or process for the solution of a problem in a finite number of steps. Commonly used as integral parts of computeçprograms. This algorithmic language is designed for expressing algorithms.



Algorithm Steps:
1. Initialize total marks and total passed to ZERO.
2. Take marks of next students.
3. Add 1 to total passed.
4. Add 1 to total boys.
5. Print out total passed. -
6. STOP

No comments:

Post a Comment