Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- double f(double x)
- {
- if (x > 0) return 3 * x + sqrt(x);
- else return exp(x) + 4;
- }
- int main()
- {
- double x;
- cin >> x;
- cout << f(x) << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement