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 / amit kumar samal
#include<stdio.h>
#include<conio.h>
void main()
{
int newno;
printf("Enter your number: ");
scanf("%d",&newno);
int result=newno/10;
int reminder=newno-result*10;
int value=reminder/2;
if(value==0)
{
printf("%d is an Even number",newno);
}
else
printf("%d is an Odd number",newno);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain b+ tree?
What is meant by realloc()?
How can I avoid the abort, retry, fail messages?
what is the different bitween abap and abap-hr?
Explain how can I avoid the abort, retry, fail messages?
What is #include stdlib h?
What is the use of sizeof () in c?
What is wrong in this statement?
What is the symbol indicated the c-preprocessor?
What are the different properties of variable number of arguments?
What is a string?
What are local static variables?
can we implement multi-threads in c.
How many types of sorting are there in c?
Why we not create function inside function.