1)
var n, i, s, k:integer;
begin
s:= 1;
k:=0;
for i:=1 to 10 do begin
readln(n);
if n < 5 then begin
s:=s*n;
k:=1;
end;
if k=1 then write(s) else write(0);
end.
2)
var n, i, s:integer;
s:= 0;
if n < 25 then begin
s:=s+n;
write(s);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
1)
var n, i, s, k:integer;
begin
s:= 1;
k:=0;
for i:=1 to 10 do begin
readln(n);
if n < 5 then begin
s:=s*n;
k:=1;
end;
if k=1 then write(s) else write(0);
end.
2)
var n, i, s:integer;
begin
s:= 0;
for i:=1 to 10 do begin
readln(n);
if n < 25 then begin
s:=s+n;
end;
write(s);
end.