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

What are the advantages of external class?

828


Can you mix old-style and new-style function syntax?

877


Do you know what are the properties of union in c?

822


How to get string length of given string in c?

829


Can a void pointer point to a function?

796


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1837


Explain how can you tell whether a program was compiled using c versus c++?

831


How do we open a binary file in Read/Write mode in C?

993


How many loops are there in c?

842


What is the scope of an external variable in c?

803


What are reserved words?

880


Can a pointer be volatile in c?

747


Explain what is meant by 'bit masking'?

908


How do you declare a variable that will hold string values?

952


Combinations of fibanocci prime series

1384