write a c program for greatest of three numbers without
using if statment

Answer Posted / ragu

int call();
void main()
{
int a,b,c,d;
printf("enter the values");
scanf("%d%d%d",&a,&b,&c);
d=call();
}
call()
{
return(a>b?a>c?a:c:b>c?b:c);
}

Is This Answer Correct ?    28 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between if else and switchstatement

1307


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

760


How do you determine a file’s attributes?

592


What is an identifier?

618


What is "Duff's Device"?

695






What is declaration and definition in c?

518


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

613


What is #error and use of it?

668


How can I get the current date or time of day in a c program?

645


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

570


What are the disadvantages of c language?

610


What is the difference between a free-standing and a hosted environment?

634


What is a scope resolution operator in c?

739


How will you find a duplicate number in a array without negating the nos ?

1635


There seem to be a few missing operators ..

609