12-12-2014, 05:39 PM
N" v
hapes="Flowchart_x003a__x0020_Decision_x0020_7">
Algorithm’s Details:
The given algorithm is taking a number ‘n’ as input from user and print the sum of even and odd numbers from 1 to n. The algorithm scans from n to 1(or 1 to n). It checks whether the number is even or odd. If number is even, add that number in SUM_EVEN and if it is odd, then add it in SUM_ODD and decrement the value of n by 1.
Flowchart:
hapes="Flowchart_x003a__x0020_Decision_x0020_7"> Algorithm’s Details:
The given algorithm is taking a number ‘n’ as input from user and print the sum of even and odd numbers from 1 to n. The algorithm scans from n to 1(or 1 to n). It checks whether the number is even or odd. If number is even, add that number in SUM_EVEN and if it is odd, then add it in SUM_ODD and decrement the value of n by 1.
Flowchart:
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
