find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / satyanarayana
#include<stdio.h>
void main()
{
int p;
printf("number:");
scanf("%d",&p);
while(p%2)
{
printf("odd");
}
printf("even");
}
| Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
what is a function method?give example?
What is the size of structure pointer in c?
What is the use of ?
What is volatile variable in c?
What is c system32 taskhostw exe?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
What functions are in conio h?
How to create struct variables?
How do you list a file’s date and time?
how to count no of words,characters,lines in a paragraph.
How many parameters should a function have?
Why c is called top down?
Explain built-in function?
Explain how can I convert a number to a string?
Distinguish between actual and formal arguments.