Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- setlocale(LC_CTYPE,"Russian");
- double x,y;
- cout << "x = ";cin >> x;
- cout << std::abs((float)cos(x)) << endl;
- cout << cos(x) << endl;
- if(x>1) y=1+sqrt(std::abs(cos(x)));
- else if((x>=(-0.5))&&(x<=1)) y=x+1;
- else if(x<(-0.5)) y=1-x*x;
- cout <<"y = " << y << endl;
- cin >> x;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement