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

i have a written test for microland please give me test pattern

2723


Is calloc better than malloc?

1005


What is difference between union All statement and Union?

1100


What is the difference between break and continue?

1491


How can a program be made to print the name of a source file where an error occurs?

1209


Why is #define used?

1269


What is the difference between class and object in c?

1157


What is a newline escape sequence?

1090


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1152


What is a macro, and explain how do you use it?

1067


Write a factorial program using C.

1062


What are the storage classes in C?

1151


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1020


What is pointer to pointer in c with example?

1052


How can you check to see whether a symbol is defined?

1092