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 ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are register variables? What are the advantage of using register variables?

1191


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2416


What is variable declaration and definition in c?

902


main() { printf("hello"); fork(); }

1206


What is exit() function?

1030


Why clrscr is used in c?

1019


What is the difference between %d and %i?

1102


What does %c do in c?

1001


What is static volatile in c?

1026


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3095


Where are local variables stored in c?

1048


What is c basic?

1184


Simplify the program segment if X = B then C ← true else C ← false

3023


Can we declare variables anywhere in c?

1006


What are structure members?

1096