Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A company which makes toothpicks needs to order logs from a logging company to make a desired number of toothpicks. However, due to poorly estimated

A company which makes toothpicks needs to order logs from a logging company to make a desired number of toothpicks. However, due to poorly estimated log requirements, the company continues to order too many logs or not creating enough toothpicks. You will create a tool which allows the operator to enter the length and radius of a log, and it will display how many toothpicks can be made from that log. The program has the following requirements: The program will ask for log dimensions in terms of length and radius After each log dimension input prompt, the program will ask the user if they sill want to enter more log dimensions After each input, the total number of toothpicks that can be produced is displayed When the user determines enough toothpicks can be created, the program prints out the total costs of the logs needed A function should be used for calculating the number of toothpicks that can be created from one log Things to know for this exercise: Volume of a cylinder: v = pi*(r^2)*h Average volume of a toothpick: 0.009204 square inches Average cost of a log by volume: $25 per cubic foot Note: What counts as "enough" toothpicks is up to the user's discretion. You can prompt the user for a target number of toothpicks if you like, but you don't have to. This aspect of the solution is flexible.

In c++

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions