10-20-2018, 07:28 AM
Program to find given first n natural number's sum and average.
Procedure:
Answer start with Average [X<>Y] then Sum
n [R/S] average [X<>Y] sum
Example: FIX 2
--------------------------------------
Find Sum and Average of 7
7 [R/S] 4 [X<>Y] 28
Answer:
Average is 4
Sum is 28
--------------------------------------
Find Sum and Average of 100
100 [R/S] 50.50 [X<>Y] 5050
Answer:
Average is 50.50
Sum is 5050
Program: Sum and Average
Gamo
Procedure:
Answer start with Average [X<>Y] then Sum
n [R/S] average [X<>Y] sum
Example: FIX 2
--------------------------------------
Find Sum and Average of 7
7 [R/S] 4 [X<>Y] 28
Answer:
Average is 4
Sum is 28
--------------------------------------
Find Sum and Average of 100
100 [R/S] 50.50 [X<>Y] 5050
Answer:
Average is 50.50
Sum is 5050
Program: Sum and Average
Code:
01 ENTER
02 ENTER
03 ENTER
04 1
05 +
06 x
07 2
08 ÷
09 ENTER
10 Rv
11 X<>Y
12 ÷
13 X<>Y
14 Rv
15 GTO 00
Gamo