ALGORITHM
---------------------------
1.WRITE AN ALGORITHM TO INPUT 2 NUMBERS AND DISPLAY THE LARGEST NUMBER .
ANSWER :
START
STEP 1: DECLARE THE VARIABLES X AND Y AS INTEGER.
STEP 2: INPUT THE VALUES OF X AND Y .
STEP3 : IF X=Y THEN PRINT "BOTH ARE EQUAL", GO TO END
STEP 4 IF X>Y THEN PRINT X,"IS LARGEST" ELSE PRINT Y,"IS LARGEST"
END
No comments:
Post a Comment