ALGORITHM
-----------------------------
3.WRITE AN ALGORITHM TO INPUT A NUMBER AND CHECK WHETHER THE NUMBER IS ODD OR EVEN.
START
STEP 1: DECLARE THE VARIABLE X AS INTEGER.
STEP2: INPUT THE VALUE OF X
STEP 3: IF X% 2=0 THEN PRINT X,"IS EVEN" ELSE PRINT X,"IS ODD" ('%' IS USED TO RETURN THE REMAINDER IN CASE OF DIVISION)
END
No comments:
Post a Comment