Program nilai_genap_ganjil;
uses wincrt;
var
a, sisa : integer;
ket : string;
Begin
clrscr;
Write ('Masukan Nilai = '); Readln (A);
sisa := a mod 2;
writeln('sisa = ',sisa);
if sisa = 0 then
ket := 'Genap'
else
ket := 'Ganjil';
writeln ('Jadi nilai adalah = ',ket);
readln;
end.
0 komentar:
Posting Komentar