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 are the data types present in c?
What is the difference between memcpy and memmove?
What is the collection of communication lines and routers called?
Write a program on swapping (100, 50)
What is a nested formula?
What is c method?
Do you know null pointer?
What is a file descriptor in c?
What is || operator and how does it function in a program?
How can you read a directory in a C program?
What is the process to generate random numbers in c programming language?
Describe the modifier in c?
What are lookup tables in c?
Why c is faster than c++?
What is difference between Structure and Unions?