Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream"
- #include "math.h"
- class number
- {
- public:
- number();
- ~number();
- double func()
- {
- return
- 5*atan(x1)+(acos(x1)*((x1+3*fabs(x1-y1)+pow(x1,2))/(fabs(x1-y1)*z1+pow(x1,2)))/(-4));
- }
- void setxyz(double x, double y, double z)
- {
- x1 = x;
- y1 = y;
- z1 = z;
- }
- private:
- double x1, y1, z1;
- };
- number::number()
- {
- }
- number::~number()
- {
- }
- int main()
- {
- number a;
- using namespace std;
- double x = 0.1722, y = 6.33, z = 3.25e-4;
- a.setxyz(x, y, z);
- cout << "Answer = " << a.func() << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement