r/CPPtogether • u/trooflaw • Feb 11 '20
Assignment 2
Write a program that asks the user to input an employees name, then separately, hours worked. The program should multiply the hours worked by a pay rate of $18.50. The user would like the program to return the name and hours entered, the pay rate, and the total net pay for the employee, on separate lines. Ultimately, the program should output:
Employee name: (nameInput)
Hours worked: (hoursInput)
Pay rate: 18.50
Net pay: (product of hoursInput and pay rate)
3
Upvotes
View all comments
Show parent comment
1
u/trooflaw Feb 11 '20
so my current issue, is if you run that code as is, the output for employeeName is only one word. for instance, if I input Jeff Bridges as employeeName it outputs
rather than
also, after this, it asks for the input for hoursWorked, as it should, however does not allow user input