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.


	Class Exercise .. Program output of IF_THEN_ELSE_TEST is...
	B
	E
	H
	I
	J


Copyright B Brown/P Henry/CIT, 1988-1997. All rights reserved.
1