Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem #3: Pumpkin Patch Pickers In this program we will determine the cost of a pumpkin by its weight using the chart below. Prompt the

Problem #3: Pumpkin Patch Pickers In this program we will determine the cost of a pumpkin by its weight using the chart below. Prompt the user for the weight of the pumpkin, making sure to validate and convert it to a correct data type.

Pumpkin Weight Cost Per Pound Up

To 5.5 lbs. $1.00 per lbs.

Up To 10.75 lbs. $0.90 per lbs.

Up To 25 lbs. $0.80 per lbs.

Up To 50 lbs. $0.70 per lbs.

Up to and including 100 lbs.$0.60 per lbs.

Above 100 lbs. $0.50 per lbs.

User Input: o Weight of pumpkin

Result To Print Out: o Your pumpkin of X lbs. costs $Y.

Data Sets to Test: o Pumpkin weight = 4.5 Result-Yourpumpkinof4.5lbs.costs$4.50.

o Pumpkin weight = 10 Result-Yourpumpkinof10lbs.costs$9.00.

o Pumpkin weight = 20.75 Result-Yourpumpkinof20.75lbs.costs$16.60.

o Pumpkin weight = 40 Result-Yourpumpkinof40lbs.costs$28.00.

o Pumpkin weight = 100 Result-Yourpumpkinof100lbs.costs$60.00.

o Pumpkin weight = 150.30 Result-Yourpumpkinof150.30lbs.costs$75.15.

o Test One Of Your Own. All 7 of these tests must be in your code in a multi-lined comment. They must not be copy and pasted and they must match your programs output.

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

More Books

Students also viewed these Databases questions