fork download
  1. // This is my C++ program for variant 07
  2. #include <iostream>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. const double x1 = 2.6;
  9. const double x2 = 2.8;
  10. const double a = 3;
  11. const double b = 6;
  12.  
  13. double y1 = pow(x1, 2); // x1^2
  14. double y2 = pow(x2, 2); // x2^2
  15. double y3 = y1 + y2;
  16. double y4 = y3 - a;
  17. double y5 = x1 + b;
  18. double c = y4 / y5;
  19.  
  20. cout << "Результат c = " << fixed;
  21. cout.precision(4);
  22. cout << c << endl;
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Результат c = 1.3488