Program z;
var i,sum:integer;
sr:real;
a:array[1..22] of integer;
begin
for i:=1 to 22 do
begin
a[i]:=random(9)+1;
sr:=sr+a[i];
end;
sr:=sr/22;
for i:=1 to 22 do
begin
if (a[i]<sr) then
sum:=sum+1;
writeln(a[i]);
end;
writeln(sum);
end.
Uses crt;
<span>var a,b,rez:real; </span>
<span>begin </span>
<span>clrscr; </span>
<span>readln(a,b); </span>
<span>Writeln('Summa - ',a*a+b*b:0:2); </span>
<span>writeln('Raznost - ',a*a-b*b:0:2); </span>
<span>writeln('Proizv - ',a*a*b*b:0:2); </span>
<span>writeln('Chastnoe - ',a*a/(b*b):0:2); </span>
<span>readkey; </span>
<span>end.</span>
Pascal:
program Main;
uses crt;
var a,b: integer;
begin
readln(a,b);
If(a>b) then writeln(b);
else writeln(a);
end.
C++:
#include <iostream>
int main() {
int a,b;
std::cin >> a >> b;
if(a >b) std::cout << b;
else std::cout << a;
system("pause");
return 0;
}
var x,n:integer;
begin
readln(n);
readln(x);
for i=:1 to n do
x:= (x-i);
end.
Если решение задачи будет не верно, извените значит надо писать более подробно.
Var n, k, i: integer;
begin k := 1; for i := 1 to 4 do begin read(n); if (n >= 3) and (n <= 9) then k := k * n; end; if k = 1 then writeln(-1) else writeln(k);end.