igorich1376

While1

Jan 27th, 2026
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.17 KB | None | 0 0
  1. ## //PT4 while1
  2. uses PT4;
  3.  
  4. Task('while1');
  5. var a := ReadReal('A:');
  6. var b := ReadReal('B:');
  7. var aa := 0.0;
  8. while a >= 0 do a -= b;
  9. if a < 0 then aa := a + b;
  10. Print(aa);
Advertisement
Add Comment
Please, Sign In to add comment