var i:integer;
begin
for i:=1 to 10 do
if i mod 2=0 then
writeln ('genap')
else
writeln ('ganjil');
end.
program coba;
var
a:integer;
f:text;
begin
assign(f,'hai');
rewrite(f);
readln(a);
if (a mod 2=0) then
writeln(f,'bilangan genap')
else
writeln(f,'bilangan ganjil');
close(f);
end.
begin
for i:=1 to 10 do
if i mod 2=0 then
writeln ('genap')
else
writeln ('ganjil');
end.
program coba;
var
a:integer;
f:text;
begin
assign(f,'hai');
rewrite(f);
readln(a);
if (a mod 2=0) then
writeln(f,'bilangan genap')
else
writeln(f,'bilangan ganjil');
close(f);
end.
0 comments:
Posting Komentar