Program TaskA; Var r1, r2: Integer; Procedure S(r1, r2: Integer); Var s: Real; Begin If r1 > r2 Then s := Pi * (r1 * r1 - r2 * r2) Else s := Pi * (r2 * r2 - r1 * r1); WriteLn('Площадь кольца: ', s:5:2); End; Begin Write('r1 = '); ReadLn(r1); Write('r2 = '); ReadLn(r2); S(r1, r2); ReadLn; End.
Program TaskA; Var r1, r2: Integer; Function S(r1, r2: Integer): Real; Begin If r1 > r2 Then result := Pi * (r1 * r1 - r2 * r2) Else result := Pi * (r2 * r2 - r1 * r1); End; Begin Write('r1 = '); ReadLn(r1); Write('r2 = '); ReadLn(r2); WriteLn('Площадь кольца: ', S(r1, r2):5:2); end.
pizzaverona
25.06.2022
9 + 9 + 9 = 27, при вводе числа, больше 27 будут выведены все трёхзначные числа.
Procedure ABC(A:integer); Var i:integer; Begin For i:= 100 to 999 do if (i div 100)+((i div 10) mod 10)+(i mod 10)<=A then Write(i,' '); End; Var A:integer; Begin Write('Введите целое число: '); ReadLn(A); ABC(A) End.
Var r1, r2: Integer;
Procedure S(r1, r2: Integer);
Var s: Real;
Begin
If r1 > r2 Then
s := Pi * (r1 * r1 - r2 * r2)
Else
s := Pi * (r2 * r2 - r1 * r1);
WriteLn('Площадь кольца: ', s:5:2);
End;
Begin
Write('r1 = ');
ReadLn(r1);
Write('r2 = ');
ReadLn(r2);
S(r1, r2);
ReadLn;
End.
Program TaskA;
Var r1, r2: Integer;
Function S(r1, r2: Integer): Real;
Begin
If r1 > r2 Then
result := Pi * (r1 * r1 - r2 * r2)
Else
result := Pi * (r2 * r2 - r1 * r1);
End;
Begin
Write('r1 = ');
ReadLn(r1);
Write('r2 = ');
ReadLn(r2);
WriteLn('Площадь кольца: ', S(r1, r2):5:2);
end.