fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. double eval(double x)
  6. {
  7. return x / (.5 * x);
  8. }
  9.  
  10. void use(double n)
  11. {
  12. int v = 1 / n;
  13.  
  14. v = eval(v);
  15. cout << v;
  16. }
  17.  
  18. int main()
  19. {
  20. use(1.f);
  21. }
  22.  
  23.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
2