Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain b+ tree?

1079


What is meant by realloc()?

1164


How can I avoid the abort, retry, fail messages?

1140


what is the different bitween abap and abap-hr?

2342


Explain how can I avoid the abort, retry, fail messages?

1061


What is #include stdlib h?

1112


What is the use of sizeof () in c?

1059


What is wrong in this statement?

1157


What is the symbol indicated the c-preprocessor?

1256


What are the different properties of variable number of arguments?

1167


What is a string?

1127


What are local static variables?

1159


can we implement multi-threads in c.

1138


How many types of sorting are there in c?

1061


Why we not create function inside function.

2207