Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- long double x,y;
- cin >>x;
- if (x<1)
- {
- y=2*x;
- cout << y;
- }
- else if (x==1)
- {
- y=-10;
- cout << y;
- }
- else if (x==3)
- {
- y=pow((x-1),4);
- cout << y;
- }
- else if (x==6)
- {
- y=sqrt(x-4);
- cout << y;
- }
- else
- {
- y=0;
- cout << y;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement