Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- x, y, z: Integer;
- begin
- x := 1;
- y := 1;
- z := 1;
- case (x > 0) of
- True:
- case (y > 0) of
- True:
- case (z > 0) of
- True: WriteLn('Combination: "X-Y-Z"!');
- False: WriteLn('Combination: "X-Y"!');
- end;
- False:
- case (z > 0) of
- True: WriteLn('Combination "X-Z!');
- False: WriteLn('Combination: "X"!');
- end;
- end;
- False:
- case (y > 0) of
- True:
- case (z > 0) of
- True: WriteLn('Combination: "Y-Z"!');
- False: WriteLn('Combination: "Y"!');
- end;
- False:
- case (z > 0) of
- True: WriteLn('Combination "Z"!');
- False: WriteLn('Combination: ""!');
- end;
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment