57.
Write a sub program to input 20
different numbers in an array variable and find the largest and smallest number
DECLARE SUB GREAT ( )
DECLARE SUB SMALL ( )
DIM SHARED N(20)
CLS
FOR I = 1 TO 20
INPUT "ENTER THE
NUMBERS"; N(I)
NEXT I
CALL GREAT
CALL SMALL
END
SUB GREAT
G = N(1)
FOR I = 2 TO 20
IF N(I) > G THEN G =
N(I)
NEXT I
PRINT "GREATEST
NUMBER"; G
END SUB
SUB SMALL
S = N(1)
FOR I = 2 TO 20
IF N(I) < S THEN S =
N(I)
NEXT I
PRINT "SMALLEST
NUMBER"; S
END SUB
not understandable but the program is right...
ReplyDeletehow did you do both small and greatest at the
same program. I dont get it
Are you stupid he just created 2 modules at the same program.
Deletethere are two procedures cant u see
ReplyDeleteyou can't see me
DeleteWant without any use of procedural program
ReplyDelete