Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program divisibolitePar31;
- Uses Wincrt;
- var
- n:integer;
- Function isDivsibleBy31(n : Integer) : Boolean;
- Begin
- While (n > 31) Do
- Begin
- n := (n div 10) - 3 * (n mod 10);
- End;
- isDivsibleBy31 := (n = 0);
- End;
- Begin
- writeln(isDivsibleBy31(31 * 5 + 1));
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement