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
Can the curly brackets { } be used to enclose a single line of code?
What is double pointer?
Are negative numbers true in c?
What is the purpose of the statement: strcat (S2, S1)?
What is #include stdio h and #include conio h?
Differentiate Source Codes from Object Codes
Why is c faster?
Write a program to swap two numbers without using third variable in c?
How does struct work in c?
Why cant I open a file by its explicit path?
what is the different bitween abap and abap-hr?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
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.
If null and 0 are equivalent as null pointer constants, which should I use?
Why & is used in scanf in c?