Ответ:
var a,b,c,s:integer;
begin
s:= 0;
readln(a);
readln(b);
readln(c);
if a mod 2 = 1 then begin
s:= s + a;
end;
if b mod 2 = 1 then begin
s:= s + b;
if c mod 2 = 1 then begin
s:= s + c;
writeln('Сумма нечетных чисел = ', s)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
var a,b,c,s:integer;
begin
s:= 0;
readln(a);
readln(b);
readln(c);
if a mod 2 = 1 then begin
s:= s + a;
end;
if b mod 2 = 1 then begin
s:= s + b;
end;
if c mod 2 = 1 then begin
s:= s + c;
end;
writeln('Сумма нечетных чисел = ', s)
end.