menentukan bilangan ganjil,genap, positif, dan negatif

29 Januari, 2009

=========================================
*menentukan bilangan ganjil,genap, positif, dan negatif
=========================================
#include
int main()
{
int x;
printf ("masukan bilangan");
scanf("%d",&x);
if(x>=0)
{
if(x%2==0)
printf("genap positif");
else
printf("ganjil positif");
}
else
{if (x%2==0)
printf("genap negatif");
else
printf("ganjil negatif");
}
}

Related Post:

0 komentar:

About This Blog

Lorem Ipsum

  © Free Blogger Templates Columnus by Ourblogtemplates.com 2008 and Modified by blog wallpaper

Back to TOP