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 / shashi

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

}

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between main and void main?

1215


What is echo in c programming?

1031


what is the syallabus of computer science students in group- 1?

2324


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2449


What is a c token and types of c tokens?

1069


What is a good way to implement complex numbers in c?

1053


Explain pointers in c programming?

1121


What does *p++ do? What does it point to?

1065


Describe dynamic data structure in c programming language?

1099


What is linear search?

1141


What are the different types of data structures in c?

1166


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1219


What is the scope of an external variable in c?

1050


Is r written in c?

1162


What is a lookup table in c?

1124