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 c program to print a given number as odd or even
without using loop statements,(no if ,while etc)

Answer Posted / manojkumar

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the number :");
scanf("%d",&a);
b=a%2;
switch(b)
{
case 1:
printf("The number %d is even",no);
break;
case 2:
printf("The number %d is odd",no);
break;
}
getch();
}

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do u mean by Direct access files? then can u explain about Direct Access Files?

2053


Why is extern used in c?

1069


Why is it usually a bad idea to use gets()? Suggest a workaround.

1720


What is time null in c?

1036


Write program to remove duplicate in an array?

1049


What is 'bus error'?

1113


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1960


Which is better malloc or calloc?

1072


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1968


What are the advantages of using macro in c language?

1086


What is the purpose of & in scanf?

1028


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1283


In a switch statement, explain what will happen if a break statement is omitted?

1015


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

3296


What is identifier in c?

981