ex87.pp 377 B

1234567891011121314151617181920212223242526272829
  1. Program Example87;
  2. { Program to demonstrate the Break function. }
  3. Var I : longint;
  4. begin
  5. I:=0;
  6. While I<10 Do
  7. begin
  8. Inc(I);
  9. If I>5 Then
  10. Break;
  11. Writeln (i);
  12. end;
  13. I:=0;
  14. Repeat
  15. Inc(I);
  16. If I>5 Then
  17. Break;
  18. Writeln (i);
  19. Until I>=10;
  20. For I:=1 to 10 do
  21. begin
  22. If I>5 Then
  23. Break;
  24. Writeln (i);
  25. end;
  26. end.