write a c program for greatest of three numbers without
using if statment
Answer Posted / swathi
main()
{
int a,b,c,s1,big;
printf("enter 3 values");
scanf("%d %d %d", &a,&b,&c);
s1=(a>b)? a : b;
big= (s1>c)? s1 : c;
printf("largest of 3 no's=%d",big);
}
Is This Answer Correct ? | 23 Yes | 6 No |
Post New Answer View All Answers
How do you override a defined macro?
What is static memory allocation?
What is the difference between if else and switchstatement
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What is a nested formula?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What is the meaning of ?
What is volatile c?
4. main() { int c=- -2; printf("c=%d",c); }
Explain what is wrong with this program statement? Void = 10;
What is a example of a variable?
Why we use int main and void main?
Explain 'bus error'?
What does printf does?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays