Thread: even or odd ??
even or odd ??
to day im going to tell u code of a programe which will tell u that a number is even or odd?
and also it count how many numbers are even and odd .
it is"nt amazing?????
so lets start....
printf("\nThis program will ask you to enter numbers and determine whether they are even or odd. It will also count how many of each you entered.\n");
printf("Enter a number: (to stop entering numbers enter 999) ");
if (num%2 != 0)
printf("\nThe number %d Is Odd.\n",num);
printf("\nThe number %d Is Even.\n",num);
printf("\nThe number of odd numbers entered was %d", oddcount);
printf("\nThe number of even numbers entered was %d", evencount);
duao me yad rkhna.....
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)