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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain heap and queue.

677


What is array in c with example?

729


What is function pointer c?

682


How can I make sure that my program is the only one accessing a file?

793


What is pivot in c?

653






What is the default value of local and global variables in c?

652


What is the use of header files?

696


Explain how does free() know explain how much memory to release?

668


What does %d do in c?

633


Explain null pointer.

710


diff between exptected result and requirement?

1685


Do you have any idea about the use of "auto" keyword?

747


What is the difference between exit() and _exit() function?

683


What does static variable mean in c?

755


Is c easier than java?

677