Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int Stepen(double a) {
- double z = a;
- int b = 3, i;
- for (i = 1; i < b; i++) {
- z *= a;
- }
- return z;
- }
- int main() {
- double j;
- int k, m;
- cout << "Enter k: ";
- cin >> k;
- cout << "Enter m: ";
- cin >> m;
- if (k < m)
- j = sin(5 * k + 3 * m * abs(k));
- else if (k > m)
- j = cos(5 * k + 3 * m * abs(k));
- else
- j = Stepen(k);
- cout << "J = " << j;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement