fork download
  1. #include <iostream>
  2. #include <cmath> // fabs, pow
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. double b, c, x;
  8.  
  9. cout << "Введите b: ";
  10. cin >> b;
  11. cout << "Введите c: ";
  12. cin >> c;
  13. cout << "Введите x: ";
  14. cin >> x;
  15.  
  16. if (x < 0 && 7 % 2 == 0) {
  17. cout << "Ошибка: для чётного корня отрицательное x не допускается." << endl;
  18. return 1;
  19. }
  20.  
  21. double root7 = pow(x, 1.0 / 7.0); // корень 7-й степени
  22. double F = pow((fabs(b + c) / root7 + 5), 2);
  23.  
  24. cout << "Результат F = " << F << endl;
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Введите b: Введите c: Введите x: Результат F = 25