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 / sarvanm

#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 ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What would be an example of a structure analogous to structure c?

944


What is the purpose of 'register' keyword in c language?

977


What are the Advantages of using macro

1115


Explain how can I remove the trailing spaces from a string?

991


What is #ifdef ? What is its application?

1054


What is uint8 in c?

1055


Is null always equal to 0(zero)?

990


Tell me the use of bit field in c language?

1016


What are the differences between Structures and Arrays?

1130


What are the advantages and disadvantages of pointers?

1012


What is the auto keyword good for?

1065


How to write a code for reverse of string without using string functions?

2075


Explain how can you restore a redirected standard stream?

1030


Do pointers need to be initialized?

1018


How can I delete a file?

1016