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...

To find whether a number is even or odd without using any
conditional operator??

Answer Posted / azad sable,chiplun.

void main()
{
int n;
clrscr();
printf("enter any no.");;
scanf("%d",&n);
if(n%2==0)/*remainder after division by 2*/
printf("\nthe no. is even");
else
printf("\nthe no. is odd");
}
getch();
}

Is This Answer Correct ?    10 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better oop or procedural?

987


What is typeof in c?

955


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1967


How can I write functions that take a variable number of arguments?

1075


What happens if header file is included twice?

1089


State two uses of pointers in C?

1008


What is the default value of local and global variables in c?

982


What is the use of in c?

946


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2578


What is the use of pointers in C?

1023


Is c language still used?

932


What is pointer and structure in c?

1072


What are header files why are they important?

1043


Is there any demerits of using pointer?

1015


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3182