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 for greatest of three numbers without
using if statment

Answer Posted / suresh

main()
{
int a,b,c,big;
printf("enter 3 values");
scanf("%d %d %d", &a,&b,&c);
big= ((a>b)&&(a>c))? a :b>c?b:c;
printf("largest of 3 no's = %d",big);
}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you list files in a directory?

1114


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

2177


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

2099


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1264


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1282


What is the difference between fread buffer() and fwrite buffer()?

1226


Is it better to bitshift a value than to multiply by 2?

1143


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

1131


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2129


What is the purpose of the statement: strcat (S2, S1)?

1223


What is a loop?

1113


What is wrong in this statement? scanf(“%d”,whatnumber);

1289


Why & is used in scanf in c?

1146


How many levels of indirection in pointers can you have in a single declaration?

1143


What is the difference between NULL and NUL?

1351