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 in c++ that can either 2 integers or 2 floating
point numbers and output the smallest number

Answer Posted / makichut

#include <iostream>
using namespace std;
int smallest(int a, int b){
return (a<b) ? a:b;
}

float smallest(float a, float b){
return (a<b) ? a: b;
}

int main(){
cout<<smallest(10,20)<<endl;
cout<<samllest(10.2,20.2)<<endl;
return 0;
}

Is This Answer Correct ?    37 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a varargs method be overloaded?

1094


What is destructor in oop?

1025


Why is destructor used?

1014


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

2189


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

2128


what type of questions

2121


What is an interface in oop?

1037


What are the important components of cohesion?

1019


What is oops and why we use oops?

1036


What is super in oop?

1170


What is object in oop with example?

1225


which feature are not hold visual basic of oop?

2188


What is the difference between a mixin and inheritance?

984


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

2147


what's the basic's in dot net

2177