Janilabo

asd

Jul 8th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.73 KB | None | 0 0
  1. var
  2.   x, y, z: Integer;
  3.  
  4. begin
  5.   x := 1;
  6.   y := 1;
  7.   z := 1;
  8.   case (x > 0) of
  9.     True:
  10.     case (y > 0) of
  11.       True:
  12.       case (z > 0) of
  13.         True: WriteLn('Combination: "X-Y-Z"!');
  14.         False: WriteLn('Combination: "X-Y"!');
  15.       end;
  16.       False:
  17.       case (z > 0) of
  18.         True: WriteLn('Combination "X-Z!');
  19.         False: WriteLn('Combination: "X"!');
  20.       end;
  21.     end;
  22.     False:
  23.     case (y > 0) of
  24.       True:
  25.       case (z > 0) of
  26.         True: WriteLn('Combination: "Y-Z"!');
  27.         False: WriteLn('Combination: "Y"!');
  28.       end;
  29.       False:
  30.       case (z > 0) of
  31.         True: WriteLn('Combination "Z"!');
  32.         False: WriteLn('Combination: ""!');
  33.       end;
  34.     end;
  35.   end;
  36. end.
Advertisement
Add Comment
Please, Sign In to add comment