Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ is the language Question 12 (25 points) In this question, we will calculate the total distance a snail travels over a sequence of days.
C++ is the language
Question 12 (25 points) In this question, we will calculate the total distance a snail travels over a sequence of days. Write a program that asks the user to enter the number of inches a snail traveled in each day. The numbers should be entered in separate lines, and end with - 1 (to indicate the end of the sequence). After reading the numbers, your program should pr.at the total distance the snail traveled. This distance should be printed in a (miles, yards, inches) format You may use the following facts: 1 foot = 12 inches 1 yurd - 3 feet Your program should interact with the user exactly as demonstrated below. Execution example: Enter the number of inches the snail traveled in day 21, or type - 1 if they reached their destination 132 Enter the number of inches the snait traveled in day 22, or type -1 if they reached their destination Enter the number of inches the snait traveled in day 23. or type 111 they reached their destination Enter the number of inches the snail traveled in day. or type1 they reached their destination Enter the ber of inches the snait traveled in day 25. type1 they reached their destination: 4 days, the sait traveled 23 yards. 1 feet and inchesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started