KedrikFeeD

программы с циклом FOR (Тема 7) (3)

Jun 29th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.25 KB | None | 0 0
  1. program SummProiz;
  2. var a,sum,pro : integer;
  3. begin
  4.  
  5.   sum := 0;
  6.   pro := 1;
  7.  
  8.   for a := 1 to 5 do begin
  9.     sum := sum + a;
  10.     pro := pro * a;
  11.   end;
  12.  
  13.   writeln('Сумма = ', sum);
  14.   Writeln('Произведение = ', pro);
  15.  
  16. end.
Add Comment
Please, Sign In to add comment