Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 scope of static variables?

1195


Is register a keyword in c?

1047


What is scope rule in c?

1071


How many keywords (reserve words) are in c?

1143


What is const keyword in c?

1166


How we can insert comments in a c program?

1129


Why can arithmetic operations not be performed on void pointers?

1046


Here is a neat trick for checking whether two strings are equal

1022


What are pointers really good for, anyway?

1066


What is hashing in c language?

1318


What is this pointer in c plus plus?

1093


hi send me sample aptitude papers of cts?

2166


What are header files? What are their uses?

1219


What are the types of type specifiers?

1045


What are global variables and how do you declare them?

1102