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

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

Is This Answer Correct ?    23 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can the curly brackets { } be used to enclose a single line of code?

1175


What is double pointer?

1008


Are negative numbers true in c?

1069


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

1171


What is #include stdio h and #include conio h?

1114


Differentiate Source Codes from Object Codes

1590


Why is c faster?

1112


Write a program to swap two numbers without using third variable in c?

1138


How does struct work in c?

1095


Why cant I open a file by its explicit path?

1038


what is the different bitween abap and abap-hr?

2342


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

1996


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1942


If null and 0 are equivalent as null pointer constants, which should I use?

1229


Why & is used in scanf in c?

1104