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
Which control loop is recommended if you have to execute set of statements for fixed number of times?
Which function in C can be used to append a string to another string?
how to create duplicate link list using C???
Compare array data type to pointer data type
What is preprocessor with example?
Should I learn data structures in c or python?
How can you invoke another program from within a C program?
How can I open files mentioned on the command line, and parse option flags?
What does 3 mean in texting?
How do we open a binary file in Read/Write mode in C?
What are the differences between Structures and Arrays?
What do you mean by command line argument?
Is it cc or c in a letter?
what are the 10 different models of writing an addition program in C language?
How can you determine the size of an allocated portion of memory?