Practical#13
SOURCE PROGRAM
10 REM FIND THE GREATER NUMBER OF ANY 3 GIVEN NUMBERS
20 CLS
30 INPUT "ENTER FIRST NUMBER=:";A
40 INPUT "ENTER SECOND NUMBER=:";B
50 INPUT "ENTER THIRD NUMBER=:";C
60 PRINT "THREE GIVEN NUMBERS ARE:",A,B,C
70 IF (A > B) AND (A > C) THEN PRINT "THE LARGEST NUMBER IS =:",A
80 IF (B > A) AND (B > C) THEN PRINT "THE LARGEST NUMBER IS =:",B
90 IF (C > A) AND (C > B) THEN PRINT "THE LARGEST NUMBER IS =:",C
100 END
OUTPUT
THREE GIVEN NUMBERS ARE: 5 4 9
THE LARGEST NUMBER IS =: 9
Monday, April 12, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment