64 648
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #38402 in C++ for Prateek

Question #38402
CALCULATE INTEREST AMOUNT USING FUNCTION OVERLOADING
Expert's answer
#include <cstdlib>
#include <iostream>
using namespace std;
int amount(int a) {
cout << "Function with one argument" << endl;
return 1;
}
int amount(int a, double b) {
cout << "Function with two arguments" << endl;
return 2;
}
int main() {
int a = 10;
double b = 25.5;
cout << "Amount: " << amount(a) << endl;
cout << "Amount: " << amount(a, b) << endl;
return 0;
}
18:02

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions