Question
Only in C# A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10
Only in C#
A software company sells a package that retails for $99. Quantity discounts are given according to the following table:
Quantity | Discount |
10 to 29 | 20% |
30 to 59 | 30% |
60 or more | 40% |
Create an application that lets the user enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.
To convert from Celsius (C) to Fahrenheit (F), use the formula C = (F - 32) 5/9
Use a while loop to calculate and display the Celsius (C) values for each Fahrenheit (F) value ranging from 0 to 100 in increments of 5. The values should be displayed in one line.
A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consume in a day. Then, she calculates the number of calories that result from the fat.
Create an application that will make these calculations. In the application, you should have the following methods:
FatCalories This method should accept a number of fat grams as an argument and return the number of calories from that amount of fat.
Calories from fat = Fat grams 9
CarbCalories This method should accept a number of carbohydrate grams as an argument and return the number of calories from that amount of carbohydrates.
Calories from carbs = Carbs grams 4
Note: Your program should request input, call those methods, and then print the results.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started