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

find a number whether it is even or odd without using any
control structures and relational operators?

Answer Posted / ramesh

#include<stdio.h>
#include<conio.h>
main()
{
int n;
char *p[]={"Even","odd"};
clrscr();
printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
getch();

}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between text and binary modes?

1239


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

2095


Is fortran still used in 2018?

1092


What is the meaning of typedef struct in c?

1114


What is the difference between #include and #include 'file' ?

1115


What will be the outcome of the following conditional statement if the value of variable s is 10?

1370


What do you mean by keywords in c?

1196


How can I get the current date or time of day in a c program?

1269


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3371


What are enumerated types?

1265


What is the difference between typedef struct and struct?

1164


What is the function of multilevel pointer in c?

1134


Explain about block scope in c?

1143


What is main () in c language?

1185


Difference between MAC vs. IP Addressing

1199