/* Adapted from Dr. Albright's class*/

/* This program computes weekly pay for an employee, given the   *
 * hours worked and the rate of pay.                             *
 *                                                               *
 *---------------------------------------------------------------*
*/

#include <stdio.h>

int main(void) {
    /* make some variables: */
	int hours;	/* number of hours worked */
	float rate;	/* rate per hour*/
	float pay;	/* total pay */


    /* get values for hours and rate */
	printf("Enter hours worked: ");
	scanf("%d", &hours );

	printf("Enter hourly rate:" );
	scanf("%f", &rate);

    /* compute total pay and display answer */
	pay = hours * rate;	

    /* display a nice table of results */
	printf( "\n\nPayroll Entry:\n");
	printf( "\thours worked:\t%3d\n", hours);
	printf( "\thourly rate:\t%6.2f\n", rate);
	printf( "\ttotal pay:\t%6.2f \n", pay );

        return 0;
}
