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

Write a program to find given number is even or odd without
using any control statement.

Answer Posted / rani

#include<stdio.h>
#include<conio.h>
void main()
{
char str[][10]={"even","odd"};
int no;
clrscr();
printf("\nEnter a number...");
scanf("%d",&no);
printf("\n%d is %s",no,str[no%2]);
getch();
}

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why void is used in c?

948


How do you initialize pointer variables?

1029


Are c and c++ the same?

1001


What are conditional operators in C?

1045


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

2136


What are loops c?

991


Should I learn data structures in c or python?

973


What is the advantage of c?

1045


What is static and volatile in c?

1170


Is printf a keyword?

1154


By using C language input a date into it and if it is right?

1017


What does %p mean c?

1016


What are the 5 data types?

1047


What does volatile do?

933


How does pointer work in c?

1070