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

What is a macro, and explain how do you use it?

0 Answers  


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

0 Answers   CLG,


Program to find the absolute value of given integer using Conditional Operators

6 Answers   N Tech,


When a c file is executed there are many files that are automatically opened what are they files?

0 Answers  


what is ANSI and ISO

7 Answers   HCL,






Explain low-order bytes.

0 Answers  


Explain what is wrong with this program statement?

0 Answers  


WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }

25 Answers  


What are the types of type specifiers?

0 Answers  


Differentiate between static and dynamic modeling.

0 Answers   Wipro,


How many main () function we can have in a project?

0 Answers  


Write code for atoi(x) where x is hexadecimal string.

5 Answers   Adobe,


Categories