write a c program for greatest of three numbers without
using if statment
Answer Posted / suresh
main()
{
int a,b,c,big;
printf("enter 3 values");
scanf("%d %d %d", &a,&b,&c);
big= ((a>b)&&(a>c))? a :b>c?b:c;
printf("largest of 3 no's = %d",big);
}
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
State two uses of pointers in C?
i want to know the procedure of qualcomm for getting a job through offcampus
what is the difference between 123 and 0123 in c?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
What is the difference between a function and a method in c?
What is the difference between array and structure in c?
What are the different categories of functions in c?
Write a program to show the change in position of a cursor using c
What is spaghetti programming?
What would be an example of a structure analogous to structure c?
Is the exit() function same as the return statement? Explain.
What does 1f stand for?
Is c procedural or object oriented?
What is the difference between procedural and declarative language?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration