1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#include <iostream>
#include <cmath>
#include<algorithm>
using namespace std;
int math(float a, float b, float t)
{
float q = pow(( a - b), 2);
float w = (pow(a,2)) / (pow(b,2));
t = q + w;
return 0;
}
int main() {
float x, y, temp1, temp2, temp3 ;
float t;
cout << "enter x, y\n==> ";
cin >> x >> y;
math(x, 5 );
temp1 = t;
math(y, 5 );
temp2 = t;
max(math((pow(x, 3)) - (pow(y, 3)), 3), (pow(x, 3)) );
temp3 = t;
cout << "result = " << temp1 + temp2 + temp3 << endl;
system("pause");
return 0;
}
|