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 larger of the two numbers without using if-else,while,for,switch

Answer Posted / nidhish mathew

#include<stdio.h>
#include<math.h>
int main()
{
int i,j;
scanf("%d%d",&a,&b);
printf("Greater Number is %d",(a+b+abs(a-b))/2);
printf("Smallest Number is %d",(a+b-abs(a-b))/2);
}

Is This Answer Correct ?    16 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the size of enum in bytes?

1049


what is the structure pointer?

2085


What are the valid places to have keyword “break”?

1054


What is c variable?

1008


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2770


What is the use of volatile?

1055


What language is c written?

988


show how link list can be used to repersent the following polynomial i) 5x+2

2218


How can you find out how much memory is available?

1031


What header files do I need in order to define the standard library functions I use?

1015


What is infinite loop?

1048


How can I call fortran?

1000


What are the data types present in c?

1110


Can we replace the struct function in tree syntax with a union?

1253


What is typedef?

1348