Var y, k, t:integer;
function fact(n:integer):integer;
begin
if n=1 then
fact:=1
else fact:=n*fact(n-1);
end;
begin
write('vvedi chislo:');
readln(k, t);
y:= 3*fact(k)+fact(t);
writeln('otvet ', y);
readln;
end.
Полный текст программы:
var a: array[1..50] of Integer;
i,x,imax,j,n: Integer;
begin
for i:=1 to n-1 do
begin
imax:=i;
for j:=i+1 to n do if a[j]>a[imax] then imax:=j;
x:=a[i];
a[i]:=a[imax];
a[imax]:=x;
end;
end.
Программа находится во вложении, надеюсь поможет.
Var X,Y:real;
Begin
Write('X = ');Read(X);
Write('Y = ');Read(Y);
if (X*X+Y*Y=1)or( (X>=0)and(Y>=0)and(X<=1)and(Y<=1) ) then Write('Попала')
else Write('Мимо')
End.