Write a program that prompts the user to enter 2 numbers. If both numbers are even, the program will print the
text Both numbers are even
. If only the first number is even, the program will print the text The first number is even
. If only the second number is even, the program will print the text The second number is even
. If neither
number is even, the program will print the text Both numbers are odd
.
Save your program in a file called hw03part1.c
.
Write a program that calculates the user's weekly pay. It will prompt the user to enter their standard hourly pay rate, then it will prompt the user to enter the number of hours they worked in the week. Your program will then print the amount that the user will be paid. The user earns their standard hourly rate for the first 40 hours they work in the week. For any time worked in a week more than 40 hours they earn overtime equal to 1.5 times their hourly rate. For example: I worked 55 hours and my standard hourly rate is $20/hour. I will be paid $1250 (40 * 20 + 15 * 30).
Save your program in a file called hw03part2.c
.
Make sure that you follow the Coding Standards for both parts.
Submit both files to the hw03
folder.
submit cs104_kdruffel hw03 hw03part1.c hw03part2.c