Saturday, 11 August 2012

Write a program to find whether number is Even or Odd.

Open TC.exe
Click on File and then Click on New.
then type.


#include<stdio.h>
#include<conio.h>
void main ()
{
clrscr ();
int n ;
printf("Enter any integer");
scanf("%d",&n);
if (n%2==0)
printf("%d is Even");
else
printf("%d is odd");
getch();
}

cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com
result :
cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com
Now here's your homework: 
Write a program to find out whether number is Negative or positive.
If you Know this answer comment below with your answer and if you don't know comment Below.

No comments:

Post a Comment