Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QCoreApplication> // удали эту строку, если делаешь в билдере
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main(int argc, char *argv[])
- {
- QCoreApplication a(argc, argv); // и эту удали
- double x,y,z;
- cout << "input x: "; cin >> x;
- cout << "input y: "; cin >> y;
- if (x*y<0){
- z = pow(x+y,2.0)+sin(x);
- cout << "1-ая ветвь" << endl;
- }
- else if (x*y==0){
- z = pow(x+y,2.0)+pow(y,3.0);
- cout << "2-ая ветвь" << endl;
- }
- else {
- z = pow(x+y,2.0) - pow(fabs(x),1.0/3.0);
- cout << "3-я ветвь" << endl;
- }
- cout << "z = " << z << endl;
- return 0;
- return a.exec(); // и эту удали
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement