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
What is the role of && operator in a program code?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
How would you obtain the current time and difference between two times?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
Want to know how to write a 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 total number of disk writes by MySQL.
What does typedef struct mean?
What are the types of functions in c?
How can I recover the file name given an open stream?
Explain 'far' and 'near' pointers in c.
Linked lists -- can you tell me how to check whether a linked list is circular?
What is #error and use of it?
What is c language & why it is used?
What does it mean when a pointer is used in an if statement?
How can you determine the size of an allocated portion of memory?
Do you have any idea about the use of "auto" keyword?