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

What is encapsulation in ict?

997


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2484


What is oops with example?

999


How is class defined?

1072


What are the 5 oop principles?

1073


What is the purpose of polymorphism?

1086


What is multilevel inheritance?

1155


What is multilevel inheritance in oop?

972


What is difference between abstraction and encapsulation?

1022


What are the types of abstraction?

999


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2552


What is the types of inheritance?

1031


What is an advantage of polymorphism?

1033


Whats oop mean?

991


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6622