Skip to content

Instantly share code, notes, and snippets.

@gabrielcesar
Created July 21, 2016 14:37
Show Gist options
  • Save gabrielcesar/f4fe164459e07a40bf7bfe4744685c8a to your computer and use it in GitHub Desktop.
Save gabrielcesar/f4fe164459e07a40bf7bfe4744685c8a to your computer and use it in GitHub Desktop.
h) Salary
/*
* h
* Salary
*/
#include <stdio.h>
int main ( void )
{
int number; // employee's number
int worked_hours; // worked hours amount
float amount; // amount the employee receives per worked hour
scanf ( "%d", &number );
scanf ( "%d", &worked_hours );
scanf ( "%f", &amount );
printf ( "NUMBER = %d\n", number );
printf ( "SALARY = U$ %.2f\n", worked_hours * amount );
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment