Answer Posted / shahbaz
void main()
{
int a,b;
cout<<"Enter number to check is it Even or Odd";
cin>>a;
if(a>=0)
{
if(a%2==0)
{
cout<<"The number is Even ";
}
else
{
cout<<"Number is Odd ";
}
}
else
{
Cout<<"Number is Lesser than Zero 0";;
}
getch();
}
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is the advantage of an array over individual variables?
How can I delete a file?
Can a program have two main functions?
What is the difference between constant pointer and constant variable?
What is #include stdlib h?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
When can you use a pointer with a function?
What do you mean by a sequential access file?
What is %d used for?
What is #line?
What are lookup tables in c?
How does pointer work in c?
What is quick sort in c?
What is pointers in c?
Define circular linked list.