Ответ:
Program programma;
Uses crt;
var n,p,i: integer;
Begin clrscr;
write('Введите число N = ');
readln(n);
p:=1;
if (n<=12) and (n>0) then begin
write('P=');
for i:=1 to n-1 do
begin
p:=p*i;
write(i,'*');
end;
p:=p*n;
write(n,'=', p);
или проще
for i:=1 to n do
write(p);
End.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Program programma;
Uses crt;
var n,p,i: integer;
Begin clrscr;
write('Введите число N = ');
readln(n);
p:=1;
if (n<=12) and (n>0) then begin
write('P=');
for i:=1 to n-1 do
begin
p:=p*i;
write(i,'*');
end;
p:=p*n;
write(n,'=', p);
end;
или проще
Program programma;
Uses crt;
var n,p,i: integer;
Begin clrscr;
write('Введите число N = ');
readln(n);
p:=1;
if (n<=12) and (n>0) then begin
write('P=');
for i:=1 to n do
p:=p*i;
write(p);
end;
End.