Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answers were Sorted based on User's Feedback
Answer / kiran
main()
{
int n;
printf("enter the number");
scanf("%d",&n);
n%2==0?(printf("given number is even");):(printf("given
number is odd"););
Is This Answer Correct ? | 8 Yes | 3 No |
#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 |
What are logical errors and how does it differ from syntax errors?
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****
what is the difference between c and c++?
What is .obj file in c?
largest Of three Number using without if condition?
What does %p mean c?
How can I avoid the abort, retry, fail messages?
Write a program to swap two numbers without using third variable in c?
what is difference between #include<stdio.h> and #include"stdio.h"
how to find the binary of a number?
Explain is it better to bitshift a value than to multiply by 2?
pgm in c to reverse string by word using array(god is love becomes love is god) (no additional array can used,space is only delimiter between words )