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
What does stand for?
number of times a digit is present in a number
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
what are bit fields in c?
Explain #pragma statements.
What is derived datatype in c?
Write a program to print ASCII code for a given digit.
How can I change their mode to binary?
What are the advantages of the functions?
Can you please compare array with pointer?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is wild pointer in c?
How can I read and write comma-delimited text?