Подставляем в ваше выражение s=s+I; числа от 1 до 5 конечный ответ s=15 I=5
Марина_Мария
05.02.2022
Program asd; uses crt; var a,b,c,max:integer; r:real; begin Write('Введите число A: '); Readln(a); Write('Введите число B: '); Readln(b); Write('Введите число C: '); Readln(c); If a>=b then max:=a else max:=b; If c>max then max:=c; r:=a+b+c; If (A>B) and (B>C) and (C>0) then Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2); If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then begin A:=max; B:=max; C:=max; Writeln('A= ',a,' B= ',b,' C= ',c); end else Writeln('Symma: ',r); end.
Дмитрий_Владимирович1162
05.02.2022
// PascalABC.NET 3.1, сборка 1218 от 12.04.2016 begin var a:=ArrRandom(ReadInteger('n='),1,99); a.Println; var k:=ReadInteger('k='); Writeln('Сумма чисел, кратных ',k,': ', a.Where(x->x mod k=0).Sum) end.