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
Differentiate call by value and call by reference?
Write a program to know whether the input number is an armstrong number.
can anyone please tell about the nested interrupts?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
In c programming language, how many parameters can be passed to a function ?
What is register variable in c language?
What is the Purpose of 'extern' keyword in a function declaration?
Are there namespaces in c?
What is the use of header files?
List the different types of c tokens?
Explain is it better to bitshift a value than to multiply by 2?
What is a pointer value and address in c?
What are the differences between Structures and Arrays?
what is a constant pointer in C
Differentiate between functions getch() and getche().