program xxxx;
uses crt;
var
i,a,s1,s2:integer;
begin
read(a);
for i:= 1 to a do
if i mod 2 = 0 then s2:=s2+i else s1:=s1=i;
writeln(s1,s2);
end.
var d,a,s1,s2:integer;
Begin
Read(a);
While a>0 do begin
d:=a mod 10;
if d mod 2 =0 then s2:=s2+d
else
s1:=s1+d;
a:=a div 10;
end;
writeln(s1,' ',s2);
End.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program xxxx;
uses crt;
var
i,a,s1,s2:integer;
begin
read(a);
for i:= 1 to a do
if i mod 2 = 0 then s2:=s2+i else s1:=s1=i;
writeln(s1,s2);
end.
var d,a,s1,s2:integer;
Begin
Read(a);
While a>0 do begin
d:=a mod 10;
if d mod 2 =0 then s2:=s2+d
else
s1:=s1+d;
a:=a div 10;
end;
writeln(s1,' ',s2);
End.