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 oops and why we use oops?

995


What is destructor oops?

1041


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3425


What is the main purpose of inheritance law?

1153


How does polymorphism work?

1080


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2566


What is encapsulation selenium?

957


Why do pointers exist?

1050


What is persistence in oop?

1101


How can you overcome the diamond problem in inheritance?

1141


What does and I oop mean?

1112


• What are the desirable attributes for memory managment?

2173


What are oops functions?

970


What is the real time example of inheritance?

1085


Write a program to reverse a string using recursive function?

2287