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...

biggest of two no's with out using if condition statement

Answer Posted / saravanan marimuthuraja

#include <stdio.h>
#include <math.h>
void main()
{
int m1,m2,a,b;
clrscr();
printf("Enter the First Number\n");
scanf("%d",&a);
printf("Enter the Second Number\n");
scanf("%d",&b);
m1=abs((a+b)/2);
m2=abs((a-b)/2);
printf("The Bigest No is==%d\n",m1+m2);
printf("The Smallest No is==%d\n",m1-m2);
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain bitwise shift operators?

1229


Explain the properties of union.

1069


What is an expression?

1036


Where are local variables stored in c?

1023


Can a pointer be volatile in c?

970


What are the different types of endless loops?

1058


Explain how can I read and write comma-delimited text?

1154


Are enumerations really portable?

1012


why do some people write if(0 == x) instead of if(x == 0)?

1050


How can I swap two values without using a temporary?

1092


Explain is it valid to address one element beyond the end of an array?

1191


What is external variable in c?

1049


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1949


What is the difference between ā€˜g’ and ā€œgā€ in C?

3975


string reverse using recursion

2445