(Programming Projects #4, Page 130) Write a program that reads a four-digit integer, such as 1998, and then displays it, one digit per line, like so:
1Your prompt should tell the user to enter a four-digit integer. You can then assume that the user follows directions. (Hint: Use the division and remainders operators.)
(Programming Projects #7, Page 130) Write a program that reads a line of text and then displays the line, but with the first occurrence of hate changed to love. For example, a possible sample dialogue might be:
Enter a line of text.You can assume that the word hate occurs in the input. If the word hate occurs more than once in the line, your program will replace only the first occurrence.
(Programming Projects #10, Page 131) Write a program that determines the change to be dispensed from a vending machine. An item in the machine can cost between 25 cents and a dollar, in 5-cent increments (25, 30, 35, ... , 90, 95, and 100), and the machine accepts only a single dollar bill to pay for the item. For example, a possible dialogue with the user might be:
Enter the price of item