Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- double x,w, a;
- cout << "введите a " << endl;
- cin >> a;
- cout << "введите x " << endl;
- cin >> x;
- if ((abs(x) < 1) && (x > 0)) {
- cout << "w=" << (a * log(abs(x)));
- }
- else if (a >= x * x) {
- cout << "w=" << (sqrt(a - x * x));
- }
- else {
- cout << "решений нет" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement