daily pastebin goal
80%
SHARE
TWEET

05

esvikey Feb 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var n,i,d,e,z,s: integer;
  2. begin
  3. write('Введите число: ');
  4. readln(n);
  5. write('Трёзначные числа, сумма цифр которых равна заданному числу: ');
  6. for i:=100 to 999 do begin
  7. s:=i div 100;
  8. z:=i mod 100;
  9. d:=z div 10;
  10. e:=i mod 10;
  11. if s+d+e=n then write(i, ' ');
  12. end;
  13. writeln;
  14. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top