fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int mult( int x, int y, int z) {
  5. return x * y * z;
  6.  
  7. int main()
  8. {
  9. int x;
  10. int y;
  11. int z;
  12.  
  13. printf("Input two integers to be multiplied: ");
  14. scanf("%d", &x);
  15. scanf("%d", &y);
  16. scanf("%d", &z);
  17. printf("The product of the three numbers is %d\n", mult( x, y, z) );
  18. }
  19.  
  20. int mult (int x, int y, int z)
  21. {
  22. return x * y * z;
  23. }
  24. }
  25.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘mult’:
prog.c:7: warning: ‘main’ is normally a non-static function
prog.c:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
prog.c:15: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
prog.c:16: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
stdout
Standard output is empty