# include <iostream.h>
# include <conio.h>
void main ()
{
int angka;
char x;
atas:
cout<<"PENGGOLONGAN BILANGAN GENAP & GANJIL"<<endl;
cout<<"===================================="<<endl;
cout<<endl<<"masukan angka = ";cin>>angka;
if ( angka%2==0) //operasi modulus
{cout<<"bilangan genap\n";
}
else
{
cout<<"bilangan ganjil";
}
cout<<"mau mencoba lagi ? (y/t) ";
cin>>x;
if(x=='y')
{clrscr();
goto atas;}
else goto exit;
exit:
}
0 comments:
Post a Comment