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
List some of the static data structures in C?
Distinguish between actual and formal arguments.
Can one function call another?
Explain how can I remove the trailing spaces from a string?
What does == mean in texting?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
Why is %d used in c?
Why is event driven programming or procedural programming, better within specific scenario?
Explain the binary height balanced tree?
Write a program that accept anumber in words
Is c weakly typed?
What is difference between union and structure in c?
Does c have class?
How do you print only part of a string?