Practical#3B
SOURCE PROGRAM
10 REM FIND OUT THE AVERAGE OF ANY FOUR NUMBERS
20 CLS
30 INPUT "ENTER FIRST NUMBER";N1
40 INPUT "ENTER SECOND NUMBER";N2
50 INPUT "ENTER THIRD NUMBER";N3
60 INPUT "ENTER FOURTH NUMBER";N4
70 PRINT "THE GIVEN NUMBERS ARE:";N1; N2; N3; N4
80 LET AVG = (N1 + N2 + N3 + N4) / 4
90 PRINT "AVERAGE OF GIVEN FOUR NUMBERS = "; AVG
100 END
OUTPUT
THE GIVEN NUMBERS ARE: 5 10 7 14
AVERAGE OF GIVEN FOUR NUMBERS = 9
Monday, April 12, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment