Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedC++ 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 inches

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago