1
May.2018
REM THE PROG TELLS IF THE GIVEN NUMBER IS EVEN OR ODD. TAKE THE NUMBER
REM DIVIDE IT BY TWO. REMAINDER IS EITHER 0 OR 1.ONCE AGAIN Q TIMES 2
REM SHOULD BE REMOVED FROM NUMBER. IF REMAINDER IS ONE THEN IT IS ODD AS
REM IT IS NOT FULLY DIVISIBLE BY 2
CLS
10 INPUT ” ENTER THE NUMBER”; N
20 FOR I = 1 TO INT(N / 2)
30 N = N – 2
40 NEXT I
50 IF N = 1 THEN PRINT “THE GIVEN NUMBER IS ODD” ELSE PRINT “THE NUMBER IS EVEN”
60 END
Category: Basic Programs, Computer Programs
No Comments