Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Shultz_Lab1.CPP
//Student Name: Logan Shultz //Program Name: Shultz_Lab1.CPP #include <iostream> #include <string> using namespace std; int main() { //Declare Variables string fname, lname, full_name; int dept, production_widgets; float hours, bonus_rate, ded_amt, ded_rate, bonus_amt, gross_pay, pay_rate, hourly_earnings, net_pay; //Input Values cout<<"\n Enter your first name: "; cin>> fname; cout<<"\n Enter your last name: "; cin>> lname; cout<<"\n Enter the department you are in (1, 2, or 3): "; cin>> dept; cout<<"\n Enter the number of hours you worked: "; cin>> hours; cout<<"\n Enter your hourly pay rate: "; cin>> pay_rate; cout<<"\n Enter your deduction rate (1% to 20%): "; cin>> ded_rate; cout<<"\n Enter the number of production widgets (1-10): "; cin>> production_widgets; //Known Input Values bonus_rate = 25.00; //Calculations full_name = fname + " " + lname; hourly_earnings = hours * pay_rate; bonus_amt = (float)production_widgets * bonus_rate; gross_pay = bonus_amt + hourly_earnings; ded_amt = gross_pay * ded_rate; net_pay = ded_amt - gross_pay; //Output cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); // cout<<"\n Name is " << full_name; cout<<"\n Bonus amount was calculated at " << bonus_amt; cout<<"\n Gross pay was calculated at " << gross_pay; cout<<"\n Net pay was calculated at " << net_pay; //End of Program Code return 0; }
run
|
edit
|
history
|
help
0
runtime template mode processor
Ploshtina na krug
10 wizards-DFS_vector
Empty C++
Programa 3 (corregido)
Networked path_dp
Średnia bez zera
Get all anagrams from given words
weak_ptr and Circle_reference
isBST