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 |
There seem to be a few missing operators ..
what is the structure pointer?
hi , please send me NIC written test papers to sbabavalli@gmail.com
how to use enum datatype?Please explain me?
what does data structure mean?
What is the difference between break and continue?
What is structure in c explain with example?
plz answer.... write a program that reads line (using getline) e.g."345", converts each line to an integer using "atoi" and computes the average of all the numbers read. also compute the standard deviation.
How can I pad a string to a known length?
Why static is used in c?
What are the general description for loop statement and available loop types in c?
How is a two dimensional array passed to function when the order of matrix is not known at complie time?