fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. float f(float W. tR)
  5. {
  6. float N;
  7.  
  8. N=5.54*pow(tR/W, 2);
  9.  
  10. return N;
  11. }
  12.  
  13. int main()
  14. {
  15. float W, tR;
  16.  
  17. scanf("%f, %f", &W, &tR);
  18. printf("%f", f(W, tR));
  19.  
  20. return 0;
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
0.1 3.2
compilation info
prog.cpp:4:16: error: expected ‘,’ or ‘...’ before ‘.’ token
 float f(float W. tR)
                ^
prog.cpp: In function ‘float f(float)’:
prog.cpp:8:13: error: ‘tR’ was not declared in this scope
  N=5.54*pow(tR/W, 2);
             ^~
prog.cpp: In function ‘int main()’:
prog.cpp:18:22: error: too many arguments to function ‘float f(float)’
  printf("%f", f(W, tR));
                      ^
prog.cpp:4:7: note: declared here
 float f(float W. tR)
       ^
stdout
Standard output is empty