Go To Index
Practical No. 4: W.A.P. to calculate the average of any four numbers.
10 CLS: Print TAB(37) "Average of any four numbers".
20 Locate 6, 30: Input "Enter your First Number",A
30 Locate 7, 30: Input "Enter your Second Number",B
40 Locate 8, 30: Input "Enter your Third Number",C
50 Locate 9, 30: Input "Enter your Fourth Number",D
60 Let Average = (A+B+C+D)/4
70 CLS: Print TAB(37) "Average of any four numbers"
80 Print TAB(30) "First Number",TAB(52)A
90 Print TAB(30) "Second Number",TAB(52)B
100 Print TAB(30) "Third Number",TAB(52)C
110 Print TAB(30) "Fourth Number",TAB(52)D
120 Print TAB(30) "Average",Average
130 END
No comments:
Post a Comment