fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. return 0;
  6. }
  7.  
Success #stdin #stdout 0.01s 5276KB
stdin
#include <stdio.h>

int main(void)
{
    int clockNumber;
    float wageRate;
    float hoursWorked;
    float grossPay;

    // Program Title
    printf("\n\t*** Pay Calculator ***\n");

    // Input
    printf("\n\tEnter Employee's Clock #: ");
    scanf("%d", &clockNumber);

    printf("\tEnter hourly wage: ");
    scanf("%f", &wageRate);

    printf("\tEnter number of hours worked: ");
    scanf("%f", &hoursWorked);

    // Calculate gross pay
    grossPay = wageRate * hoursWorked;

    // Output
    printf("\n\t-----------------------------------------\n");
    printf("\tClock#  Wage  Hours  Gross\n");
    printf("\t-----------------------------------------\n");

    printf("\t%06d  %5.2f  %4.1f  %7.2f\n",
           clockNumber, wageRate, hoursWorked, grossPay);

    return 0;
}
stdout
Standard output is empty