fork download
  1. //*******************************************************
  2. //
  3. // Homework: 1 (Chapter 4/5)
  4. //
  5. // Name: <add your name>
  6. //
  7. // Class: C Programming, <add semester and year>
  8. //
  9. // Date: <add current date>
  10. //
  11. // Description: Program which determines gross pay and outputs
  12. // to the screen. This version does not use file pointers
  13. //
  14. // Non file pointer solution
  15. //
  16. //********************************************************
  17.  
  18. #include <stdio.h>
  19. int main ()
  20. {
  21. int x = 10; // simple integer value
  22. x %= 2;
  23. printf ("x = %i", x);
  24. return (0); // success
  25.  
  26. } // main
Success #stdin #stdout 0s 5292KB
stdin
23456
23.45
46.1
stdout
x = 0