You have to use an if-else. Now you can disguise this by using code that doesn't explicitly have "if else" in it. Look up the ternary operator:
x is what you are testing for. If x is true then a. If x is false then b.
So you could say:
- (hours > 1) ? 1500, 1000;
Then if the hours are greater than 1, the pay rate is 1500. Otherwise the pay rate is 1000.
This is still if-else. The ternary operator is obsolete except in classroom problems like this one. It comes from the belief that the less code you write, the compiler will generate fewer instructions. This was OK back in the days of very tiny computers. With todays gigabyte world you never use this.