uses Crt; var s,i:integer; begin ClrScr; i:=0; s:=0; While i<10 do Begin i:=i+2; s:=s+i; end; writeln('Summa chetnih ot 1 do 10 = ', s); i:=1; s:=1; While i<9 do Begin i:=i+2; s:=s*i; end; writeln('Proizv nechetnih ot 1 do 10 = ', s); readln; end.
Program asd;
var chet,nechet,i:integer;
begin
for i:=1 to 10 do begin
If (i div 2)=0 then chet:=chet*i;
If (i div 2)=1 then nechet:=nechet+i
end;
Writeln(chet,nechet);
end.
uses Crt;
var s,i:integer;
begin
ClrScr;
i:=0;
s:=0;
While i<10 do
Begin
i:=i+2;
s:=s+i;
end;
writeln('Summa chetnih ot 1 do 10 = ', s);
i:=1;
s:=1;
While i<9 do
Begin
i:=i+2;
s:=s*i;
end;
writeln('Proizv nechetnih ot 1 do 10 = ', s);
readln;
end.
Program asd;
var chet,nechet,i:integer;
begin
for i:=1 to 10 do begin
If (i div 2)=0 then chet:=chet*i;
If (i div 2)=1 then nechet:=nechet+i
end;
Writeln(chet,nechet);
end.