To find whether a number is even or odd without using any
conditional operator??
Answer Posted / rudrakshala leela phani kumar
int main()
{
int a[2][5]={"Even","Odd"};
int n;
printf("Enter Integet No:");
scanf("%d",&n);
printf("\nResult:%d",a[n%2]);
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the use of structure padding in c?
What are valid signatures for the Main function?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What is a structure and why it is used?
What do you mean by recursion in c?
What is size of union in c?
What is the best style for code layout in c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Place the #include statement must be written in the program?
how to make a scientific calculater ?
How can you read a directory in a C program?
When should a type cast not be used?
Is c easier than java?
How can I remove the leading spaces from a string?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????