fork download
  1. #include <stdio.h>
  2. float conv(float f);
  3. main(){
  4. float fahr, celsius;
  5. float lower, upper, step;
  6. lower = 0;
  7. upper = 300;
  8. step = 20;
  9. fahr = lower;
  10. while(fahr <= upper){
  11. celsius = conv(fahr);
  12. printf("%3.0f\t%6.1f\n", fahr, celsius);
  13. fahr = fahr + step;
  14. return 0;
  15. }
  16. float conv(float f, float celsius){
  17. celsius = (5.0 / 9.0) * (fahr - 32.0);
  18. return celsius;
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3:1: warning: return type defaults to ‘int’ [-Wreturn-type]
prog.c: In function ‘main’:
prog.c:20:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/8p7v8l/ccccKlmp.o: In function `main':
prog.c:(.text.startup+0x13): undefined reference to `conv'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty