write a c program to find biggest of 3 number without
relational operator?

Answers were Sorted based on User's Feedback



write a c program to find biggest of 3 number without relational operator?..

Answer / sidhartha

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,big;
clrscr();
printf("\n ENTER 3 VALUES : ");
scanf("%d%d%d",&a,&b,&c);
big=(a>b && a>c ? a:b>c ? b:c);
printf("\n THE BIGGEST NUMBER IS : %d",big);
getch();
]

Is This Answer Correct ?    22 Yes 63 No

write a c program to find biggest of 3 number without relational operator?..

Answer / priyanka

#include<stdio.h>
#include<conio.h>
void main()
int a,b,c;
clrscr();
printf("enter any three no.s");
scanf("%d%d%d",&a,&b&c);
if(a>b&&a>c);
{
printf("a is biggest");
}
else if(b>a&&b>c)
{
printf("b is biggest");
}
else
printf("c is biggest");
getch();
}

Is This Answer Correct ?    52 Yes 105 No

Post New Answer

More C Interview Questions

What do header files do?

0 Answers  


sum of two integers values only other then integer it should print invalid input.

1 Answers  


How can my program discover the complete pathname to the executable from which it was invoked?

0 Answers  


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

0 Answers  


#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?

4 Answers   Infosys,


how to create c progarm without void main()?

1 Answers   NIIT,


main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(“%d”,x); }

8 Answers   Vector,


How would you write qsort?

1 Answers  


64/square(4)

1 Answers  


Explain how are 16- and 32-bit numbers stored?

0 Answers  


What are valid operations on pointers?

0 Answers  


What is wrong with this statement? Myname = 'robin';

0 Answers  


Categories