Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <math.h>
- #include <iomanip>
- #include <iostream>
- #include <stdio.h>
- #include <conio.h>
- using namespace std;
- double result;
- class Y;
- class X
- {
- private:
- double x;
- double y;
- public:
- X () {
- x = 6.251;
- y = 0.827;
- }
- friend void run (X, X, Y);
- friend void print (X, X, Y);
- ~ X() {}
- };
- class Y
- {
- private:
- double z;
- public:
- Y () {
- z = 25.001;
- }
- friend void run (X, X, Y);
- friend void print (X, X, Y);
- ~ Y() {}
- };
- void run (X, X, Y)
- {
- X r1;
- X r2;
- Y r3;
- result = pow(r2.y, pow(abs(r1.x), 1/3.)) + pow(cos(r2.y), 3) * ( abs(r1.x - r2.y) * abs(1 + (pow(sin(r3.z), 2))/(sqrt(r1.x+r2.y))) / ( exp(abs(r1.x-r2.y)) + 1/(pow(r2.y,2)+1)));
- }
- void print (X, X, Y)
- {
- cout<<result<<endl;
- }
- void main()
- {
- X f1;
- X f2;
- Y f3;
- run (f1, f2, f3);
- print (f1, f2, f3);
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement