fork download
  1. // C code
  2. // This program will show various Arithmetic Operations.
  3. // Developer: Faculty CMIS102
  4. // Date: Jan 31, 2014
  5.  
  6. #include <stdio.h>
  7. int main(void)
  8. {
  9. int i,j;
  10. float c,d,e,f,g,h;
  11. i = 5; j = 2;
  12. d= 5.0; e = 2.0; f = 3.0;
  13.  
  14. c = i / j;
  15. printf("value of c is: %f \n", c);
  16.  
  17. g = f + d /2;
  18. h = (f + d )/2;
  19. printf("value of g is: %f \n", g);
  20. printf("value of h is: %f \n", h);
  21. return 0;
  22. }
  23.  
  24.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
value of c is:  2.000000  
value of g is:  5.500000  
value of h is:  4.000000