Advertisement
Alex_Fomin

Untitled

Mar 6th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.32 KB | None | 0 0
  1. function Rank(x: longint): byte;
  2. begin
  3.   Result := 0;
  4.   while x <> 0 do
  5.   begin
  6.     Result += 1;
  7.     x := x div 10;
  8.   end;
  9. end;
  10.  
  11. label goback;
  12.  
  13. var
  14.   x: integer;
  15.  
  16. begin
  17.   goback:
  18.   x := ReadLnInteger('Введите число:');
  19.   if Rank(x) <> 4 then goto goback else WriteLn('Результат: ', x);
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement