Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main() {
- double x = 1, y = 1, z;
- const double e = 2.71828;
- cout << "x, y =" << endl;
- cin >> x >> y;
- if (x < 0) {
- y = x * x;
- }
- else if (x >= 0) {
- y = pow(pow(e, cos(x)), 1 / 5.0);
- }
- if (y < 0.2) {
- z = 0.5 * x - pow(y, 3) + 1;
- }
- else if (x > 0.2) {
- z = pow(y, 2) / (x - 0.4);
- }
- else {
- z = (1 - pow(y, 2)) / pow(3, x);
- }
- cout << "y = " << y << endl;
- cout << "z = " << z << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment