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 a class
What is polymorphism ? Explain with examples
What is difference between abstraction and encapsulation?
Which is not an object oriented programming language?
What is the purpose of enum?
what is polymorpsim? what are its types?
what is object slicing?
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
if u write a class do u write Assignment operator and copy constructor
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
difference between class and object
10 Answers Chandan, IBM, Magic Soft,
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.