write a c program to find biggest of 3 number without
relational operator?
Answer Posted / m. priyanga
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter the values a,b,c:");
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(a>c))
printf("a is greatest of %d %d %d",a,b,c);
else if(b>c)
printf("b is greatest of %d %d %d",a,b,c);
else
printf("c is greatest of %d %d %d",a,b,c);
getch();
}
Output:
Enter the values a,b,c: 4 5 6
c is greatest of 4 5 6
| Is This Answer Correct ? | 2 Yes | 7 No |
Post New Answer View All Answers
What is the best way of making my program efficient?
Where can I get an ansi-compatible lint?
Differentiate between functions getch() and getche().
What is the purpose of main( ) in c language?
What does typeof return in c?
What are header files and explain what are its uses in c programming?
How can I handle floating-point exceptions gracefully?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is a MAC Address?
Here is a good puzzle: how do you write a program which produces its own source code as output?
Is there anything like an ifdef for typedefs?
How would you rename a function in C?
How can I implement a delay, or time a users response, with sub-second resolution?
Explain low-order bytes.
What is the difference between int main and void main in c?