what is the other ways to find a logic to print whether a
number is an even or odd wit out using % symbol??????? i
know three different ways to print it. so i need any other
different logic>>>>>
Answer Posted / abdur rab
You can do it without using if even
#include <stdio.h>
int main ( int argc, char* argv[] )
{
int _number;
char _value[2][5]={"EVEN", "ODD"};
printf( "Enter an ineteger :" );
scanf( "%d", &_number );
printf( "\nThe given number is :%s", _value [ x &
0x1 ] );
return ( 0 );
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to establish connection with oracle database software from c language?
number of times a digit is present in a number
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Why header files are used?
Is the exit() function same as the return statement? Explain.
What does the error 'Null Pointer Assignment' mean and what causes this error?
provide an example of the Group by clause, when would you use this clause
How does struct work in c?
What is array of pointers to string?
how can use subset in c program and give more example
What is hungarian notation? Is it worthwhile?
What is scope of variable in c?
What are c preprocessors?
What is use of #include in c?
What does c mean in standard form?