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 / abin m devasia,biju k m

#include<iostream.h>
void main()
{
int a,b,c;
cin>>a>>b;
c=abs(a-b);
c=(a+b+c)/2;
cout<<"Big is"<<c;
}

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is output redirection?

1186


How can I handle floating-point exceptions gracefully?

1131


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1070


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1059


Explain b+ tree?

1024


How can I find the modification date and time of a file?

1056


What is calloc malloc realloc in c?

1025


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1047


Explain what is the difference between functions abs() and fabs()?

1125


What is the difference between if else and switchstatement

1883


Why is it that not all header files are declared in every C program?

1163


Explain the use of keyword 'register' with respect to variables.

988


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1066


How do you search data in a data file using random access method?

1270


What are the 5 data types?

1080