Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want the program as c++ code (can be written in code blocks ) Exercise # 5: Hero Run A hero can run very fast.

image text in transcribedI want the program as c++ code (can be written in code blocks )

Exercise # 5: Hero Run A hero can run very fast. To start running, he needs to drink a bottle of orange juice. After drinking the first bottle he can run 10 km. To run more, he needs more juice. After the drinking the second bottle he can run 20 km, and after drinking the next bottle 30 km and so on. Sadly, he can never go more than 40 km after the fourth bottle. Input the total distance he needs to run and calculate how many bottles of orange juice our hero needs to cover that distance. Enter Total Distance: 80 After 1 bottle(s) at: 10 km After 2 bottle(s) at: 30 km After 3 bottle(s) at: 60 km After 4 bottle(s) at: 100 km Our hero needs 4 bottle(s) of orange juice. Enter Total Distance: 160 After 1 bottle(s) at: 10 km After 2 bottle(s) at: 30 km After 3 bottle(s) at: 60 km After 4 bottle(s) at: 1e0 km After 5 bottle(s) at: 140 km fter 6 bottle(s) at: 180 km ur hero needs 6 bottle(s) of orange juice

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_2

Step: 3

blur-text-image_3

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

7. Determine what feedback is provided to employees.

Answered: 1 week ago