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 |
What is the full form of oops?
What is oops in simple words?
tell about copy constructor
How compiler selects(internally) required overridden function in inheritance?
2 Answers CSC, Infinite Computer Solutions,
create a c++ program that will accepts 9 inputs using 3 by 3 array.
What are oops functions?
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
What is inheritance in simple words?
which are the 4 members functions in c++ objects that can either be declared explicitly by programmer or implementation if nt available.
Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.
what do you mean by static member variable?
Is html an oop?