CLASS EXERCISE
What is displayed when the following program is executed?
program IF_THEN_ELSE_TEST (output); var a, b, c, d : integer; begin a := 5; b := 3; c := 99; d := 5; if a > 6 then writeln('A'); if a > b then writeln('B'); if b = c then begin writeln('C'); writeln('D') end; if b <> c then writeln('E') else writeln('F'); if a >= c then writeln('G') else writeln('H'); if a <= d then begin writeln('I'); writeln('J') end end. Click here for answer
PROGRAM SIX
Write a program which inputs two values, call them A and B. Print
the value of the largest variable.
PROGRAM SEVEN
Modify the program you wrote for program six, to accept three
values, A B C, and print the largest value.