fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(void) {
  4. float pi = 3.14159265359;
  5. float x, y;
  6. cout << "Enter value for x: ";
  7. cin >> x;
  8. y = (x * x / (pi * pi * (x * x + 1. / 2.))) * (1 + (x * x / (pi * pi * (x * x - 1. / 2.) * (x * x - 1. / 2.))));
  9. cout << "y = " << y;
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 15240KB
stdin
-1.5
stdout
Enter value for x: y = 0.0890702