Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <cmath>
- using namespace std;
- int main()
- {
- float x, a, ax, q;
- cout << "Prosze podac znaczenia dla zmiennych 'x' ta 'a' przez spacja\n";
- cin >> x >> a;
- ax = x * a;
- if (ax < -15.0)
- {
- q = pow(a, 3.0) + log(1 + abs(x));
- }
- if (-15.0 <= ax <= -5.0)
- {
- q = sqrt(a + sin(pow(a, 2.0) * x));
- }
- if (-5.0 < ax < 0)
- {
- q = 1 + a * (cos(pow(x, 3.0) / sin(pow(x, 3.0))));
- }
- if (ax > 15.0)
- {
- q = round(pow(a, 3.0) + log(1 + abs(x)));
- }
- cout << "Znaczennia q = " << q << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement