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
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
What is a char c?
What does int main () mean?
What is the difference between call by value and call by reference in c?
What are shell structures used for?
Explain how can you avoid including a header more than once?
In a switch statement, what will happen if a break statement is omitted?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
How do I use strcmp?
What is hungarian notation? Is it worthwhile?
Explain the use of function toupper() with and example code?
Write a program which returns the first non repetitive character in the string?
What is define c?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What are the different types of endless loops?