Question: Your CSS Homework 2-2 Write a program that asks the user for distance in inches and prints the number of yards, feet, and remaining inches
Your CSS Homework 2-2 Write a program that asks the user for distance in inches and prints the number of yards, feet, and remaining inches (reminder there are 3 feet in a yard, 12 inches in a foot). Note that you should use plural "yards", "feet, and "inches" for all outputs (even in the cases where it is grammatically incorrect). For example: User entered: 367, your program would output: 10 yards, 0 feet, and 7 inches. User entered: 750, your program would output: 20 yards. 2 feet, and 6 inches. User entered: 1000, your program would output: 27 yards, 2 feet, and 4 inches. Your prompt to the user to enter the number of inches must be: Enter number of inches: Your output must be of the format: numaxde yards, numeet feet, and num Inches inches. Please make sure to end each line of output with a newline. Please note that your class should be named YardsFeetinches. Homework 2-3 Your CSS Homework 2-2 Write a program that asks the user for distance in inches and prints the number of yards, feet, and remaining inches (reminder there are 3 feet in a yard, 12 inches in a foot). Note that you should use plural "yards", "feet, and "inches" for all outputs (even in the cases where it is grammatically incorrect). For example: User entered: 367, your program would output: 10 yards, 0 feet, and 7 inches. User entered: 750, your program would output: 20 yards. 2 feet, and 6 inches. User entered: 1000, your program would output: 27 yards, 2 feet, and 4 inches. Your prompt to the user to enter the number of inches must be: Enter number of inches: Your output must be of the format: numaxde yards, numeet feet, and num Inches inches. Please make sure to end each line of output with a newline. Please note that your class should be named YardsFeetinches. Homework 2-3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
