Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can you think of a logic behind the game minesweeper.

2461


Can math operations be performed on a void pointer?

1043


how do you execute a c program in unix.

1111


Is that possible to store 32768 in an int data type variable?

1075


What is return type in c?

1131


How can you increase the size of a statically allocated array?

1079


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1056


What does c mean before a date?

1174


Explain what is a pragma?

1047


What are the data types present in c?

1160


Explain bitwise shift operators?

1243


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1223


Explain high-order and low-order bytes.

1094


How can you call a function, given its name as a string?

1153


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2069