fork(1) download
  1.  
  2.  
  3. #include <stdio.h>
  4. int main ()
  5. {
  6.  
  7. int clockNumber = 98401;
  8. float gross;
  9. float hours = 51.0;
  10. float wageRate = 10.60;
  11.  
  12. printf ("\n\t*** Pay Calculator ***\n");
  13.  
  14.  
  15. gross = wageRate * hours;
  16.  
  17.  
  18. printf ("\n\n\t----------------------------------------------------------\n");
  19. printf ("\tClock # Wage Hours Gross\n");
  20. printf ("\t----------------------------------------------------------\n");
  21.  
  22. printf ("\t%06i %5.2f %5.1f %7.2f\n", clockNumber, wageRate, hours, gross);
  23.  
  24. return (0); // success
  25.  
  26. } // main
Success #stdin #stdout 0.01s 5320KB
stdin
98401
10.60
51.0
stdout
	*** Pay Calculator ***


	----------------------------------------------------------
	Clock # Wage Hours Gross
	----------------------------------------------------------
	098401 10.60  51.0  540.60