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

Explain how can you check to see whether a symbol is defined?

0 Answers  


What are the complete rules for header file searching?

0 Answers  


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

0 Answers   Convergys,


who is the father of c

4 Answers   Infosys,


What is wild pointer in c with example?

0 Answers  






Explain how to reverse singly link list.

0 Answers  


What do you mean by a local block?

0 Answers   InterGraph,


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


related proverb of "dont count your chicken before it hatches"

1 Answers  


How are portions of a program disabled in demo versions?

0 Answers  


When do we get logical errors?

0 Answers  


How old is c programming language?

0 Answers  


Categories