include iostream using namespace std double composition double double

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;
double composition(double a, double b) {
return a * b;
}
int composition(int a, int b) {
return a * b;
}
int main() {
cout << "composition double a * double b = " << composition(1.5, 2.5) << endl;
cout << "composition int a * int b = " << composition(4, 2) << endl;
return 0;
}