write a c program to find largest of three numbers using simple if only for one time.



write a c program to find largest of three numbers using simple if only for one time...

Answer / 1160

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,max;
scanf("%d %d %d",&a,&b,&c);
if (a>b && a>c)
{
printf("%d",a);
}
max=(b>c)&&(c>a)?printf("%d",b):printf("%d",c);
return max;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Where is c used?

0 Answers  


How can variables be characterized?

0 Answers  


what is data structure

5 Answers   Maveric, TCS,


How can I get back to the interactive keyboard if stdin is redirected?

0 Answers  


What is the difference between malloc() and realloc()?

2 Answers  


Result of the following program is main() { int i=0; for(i=0;i<20;i++) { switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf("%d,",i); } } a)0,5,9,13,17 b)5,9,13,17 c)12,17,22 d)16,21 e)syntax error

8 Answers   IBM,


Can anyone help me with this please? Need to print the below values.. Thanks 1 1 2 1 2 3 1 2 3 4

3 Answers  


Can we add pointers together?

0 Answers  


What does emoji p mean?

0 Answers  


Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 Answers  


What is %lu in c?

0 Answers  


What are the different types of control structures in programming?

0 Answers  


Categories