fork download
  1. // C code
  2. // This program will sum two integer numbers to yield a third integer number.
  3. // Developer: Faculty CMIS102
  4. // Date: Jan 31, XXXX
  5.  
  6. #include <stdio.h>
  7. int main ()
  8. {
  9. /* variable definition: */
  10. float a, b, c;
  11.  
  12. /* variable initialization */
  13. a = 10.0f;
  14. b = 2f;
  15. c = a / b;
  16. printf("Integers (a,b) and qoutient (c) are : %d,%d,%d \n", a,b,c);
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:14:7: error: invalid suffix "f" on integer constant
   b = 2f;
       ^~
prog.c:16:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
   printf("Integers (a,b) and qoutient (c) are : %d,%d,%d \n", a,b,c);
                                                  ^
prog.c:16:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat=]
   printf("Integers (a,b) and qoutient (c) are : %d,%d,%d \n", a,b,c);
                                                     ^
prog.c:16:56: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
   printf("Integers (a,b) and qoutient (c) are : %d,%d,%d \n", a,b,c);
                                                        ^
stdout
Standard output is empty