Xisepe

хрень на паскале

Nov 27th, 2021
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.45 KB | None | 0 0
  1. program Numbers;
  2.  
  3. var
  4.   n : integer = 4;
  5.   c : integer = 1;
  6.   tmp : integer;
  7. begin
  8.   while n < 100 do
  9.   begin
  10.     tmp:=n;
  11.     if(tmp mod 10 = 3) then
  12.     begin
  13.         c := c + 1;
  14.         writeln(n);
  15.     end
  16.     else
  17.     begin
  18.         tmp := tmp div 10;
  19.         if(tmp mod 10 = 3) then begin
  20.             c:= c + 1;
  21.             writeln(n);
  22.         end;
  23.     end;
  24.     n:=n+1;    
  25.   end;
  26.   writeln('Количество: ', c);
  27. end.
Advertisement
Add Comment
Please, Sign In to add comment