Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is to be done in Visual Studios with C# code. Prompt the user for 3 prices of different food items and store their responses

This is to be done in Visual Studios with C# code.

Prompt the user for 3 prices of different food items and store their responses inside of variables that you create. i. Prompt for the price of 1. An Apple 2. A Steak 3. Ice Cream.

Convert and store the user prompts into a number data type that you can work with using the math operators.

After you have the cost of the food item, prompt the user for the quantity desired for each of the 3 individual food items. Convert and store the quantity into a number data type that you can work with using the math operators.

Finally prompt the user for the sales tax % where they live. This should be taken in as a whole number like 7 for 7% tax, instead of trying to have the user convert it to .07. Convert and store the sales tax into a number data type that you can work with using the math operators.

Using the user prompted variables calculate the following values and remember to store them inside of a variable that you create. Give each user the total cost for each of the items without sales tax.

1. Ex. 3 apples will cost you $1.50. The total cost of all of the items before the sales tax. 1. Ex. The total before tax is $20.50. The total cost of the sales tax for all of the items combined. 1. Ex. The sales tax for all of your items is $1.25.

Then finally the grand total for all of the items bought and the sales tax added in. 1. Ex. The grand total for your bill including tax is $30.45. h. Check that your calculator is working correctly with the test values below. i. These test values should also be in a multi-lined comment at the end of your code or you will get points deducted. If you would like to round your numbers to 2 decimal places check out Math.Round() or your could also check .ToString(C) to format the number as currency.

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions

Question

Define the term Working Capital Gap.

Answered: 1 week ago