Program to find largest of three numbers without using comparsion operator?
Answer Posted / a.naga tirupathi rao
#include <stdio.h>
#include <conio.h>
main()
{
int a[i],sum=0,i,j;
for(i=1;i<=3;i++)
{
scanf("%d",&a[i]);
sum=sum+a[i];
}
for(j=sum;j<=sum;j--)
{
for(i=1;i<=3;i++)
{
if(j==a[i])
{
printf("%d is biggest",j);
break;
}
}
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
provide an example of the Group by clause, when would you use this clause
Describe the difference between = and == symbols in c programming?
Why is c so popular?
How is actual parameter different from the formal parameter?
Differentiate between the = symbol and == symbol?
State the difference between x3 and x[3].
What is the size of enum in c?
if p is a string contained in a string?
What is a 'null pointer assignment' error?
Why C language is a procedural language?
Why clrscr is used in c?
What is the use of clrscr?
What is pointers in c?
What is function definition in c?
How can I make it pause before closing the program output window?