uses crt ;
var A:array[1..10]of integer ;
B ,C ,D:integer;
begin
clrscr;
for B:= 1 to 10 do
begin
write ('Masukan Angka');
read (A[B]);
if (A[B]>0)
then write ('Positif ')
else write ('Negatif ')
while (A[B]>0) do
begin
A[B]:=A[B]-2;
if (A[B]=0)
then writeln ('Genap ')
else if (A[B]=-1)
then writeln ('Ganjil ');
end;
while (A[B]<0) do
begin
A[B]:=A[B]+2;
end;
readln;
end;
end.
by : http://rakunrakun.blogspot.co.id
No comments:
Post a Comment