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 kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

3 Answers   Accenture,


What is the difference between void main() and void main (void) give example programme?

0 Answers  


What is typedef struct in c?

0 Answers  


Write a program to show the workingof auto variable.

2 Answers   Infotech,


What is the use of the restrict keyword?

1 Answers  


The variables are int sum=10,SuM=20; these are same or different?

3 Answers  


can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?

2 Answers  


What are variables and it what way is it different from constants?

0 Answers  


f() { int a=2; f1(a++); } f1(int c) { printf("%d", c); } c=?

7 Answers   Geometric Software,


Find MAXIMUM of three distinct integers using a single C statement

0 Answers  


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

0 Answers  


Explain what are its uses in c programming?

0 Answers  


Categories