program in c++ that can either 2 integers or 2 floating
point numbers and output the smallest number
Answer / 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 |
Which method cannot be overridden?
What is a linked list?
What is command routing in MFC
What is object-oriented programming? Webopedia definition
what is multi level inheritance give n example ?
13 Answers HDFC, Hulas Steel, Ness Technologies,
what is use to destroy an object? illustrate.
Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
what is the difference b/w abstract and interface?
2 Answers Merrill Lynch, Schneider, Scio Healthcare,
What is interface in oop?
what is difference between objects and function
Why u change company?
Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?