Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answer Posted / ramu gurram
#include<stdio.h>
int main()
{
int i;
printf("enter a number \n");
scanf("%d",i);
float f=i%2;
f==0 ? printf("given number is even") : printf("given
number is odd");
return 0;
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the use of gets and puts?
What is the size of a union variable?
I need a sort of an approximate strcmp routine?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What is the meaning of && in c?
How can I list all of the predefined identifiers?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
I need testPalindrome and removeSpace
#include
Can a variable be both const and volatile?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Difference between strcpy() and memcpy() function?
How can I swap two values without using a temporary?
What is modifier & how many types of modifiers available in c?
Explain what are its uses in c programming?
shorting algorithmS