Tuesday, January 4, 2011

ODD SERIES 20 TO 1

WAP TO PRINT EVEN & ODD NUMBERS FROM 20 TO 1
void main ()
{
int a;
clrscr ();
a=20;
while (a>=1)
{
if (a%2==0)
printf ("%d\t",a);
else
printf ("%d\n",a);
a--;
}
getch ();
}


No comments:

Post a Comment