I'm a new programmer in my first class. I am supposed to write a code that calculates gross/net pay from hours and hourly rate. When you run the program it starts out blank but if you type numbers it will enter it in as hours worked. Then ask for hourly rate. Can someone share some light on why this is occurring?
Just to be clear -- you're saying that you never see the text "Enter the # of hours worked: " printed out on the screen?
Did you just recently add that line to your code?
cin and cout are tied together (meaning, cout will be flushed to show the text), so you shouldn't need to do anything fancy to get that text to display.
What IDE/compiler are you using? Can you try to clean/rebuild your project?