You are going to purchase (2) items from an online store.
If you spend $100 or more, you will get a 10% discount on your total purchase.
If you spend between $50 and $100, you will get a 5% discount on your total purchase.
If you spend less than $50, you will get no discount.
Givens:
Cost of First Item (in $)
Cost of Second Item (in $)
Result To Print Out:
"Your total purchase is $X." or "Your total purchase is $X, which includes your X% discount."

Answers

Answer 1

Answer:

Code:-

using System;

using System.Collections.Generic;

class MainClass {

public static void Main (string[] args) {

int Val1,Val2,total;

string input;

double overall;

Console.Write("Cost of First Item (in $)");

      input = Console.ReadLine();

Val1 = Convert.ToInt32(input);

Console.Write("Cost of Second Item (in $)");

      input = Console.ReadLine();

Val2 = Convert.ToInt32(input);

total=Val1+Val2;

if (total >= 100)

{

overall=.9*total;

Console.WriteLine("Your total purchase is $"+overall);

}

else if (total >= 50 & total < 100)

{

overall=.95*total;

Console.WriteLine("Your total purchase is $"+overall);

}  

else

{

Console.WriteLine("Your total purchase is $"+total);

}  

}

}

Output:

You Are Going To Purchase (2) Items From An Online Store.If You Spend $100 Or More, You Will Get A 10%

Related Questions

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….

a. Margin
b. View
c. LayOut
d. Paragraph

Office 92 sering disebut juga dengan….

a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0


Answers

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah

B.View

Office 92 sering disebut juga dengan

A.Office 3.0

Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:

Answers

user_in = input ("Please enter your username: " )

if user_in in "0123456789":

print ("Username cannot contain numbers")

elif user_in in "?":

print ("Username cannot continue special character")

else:

print (" Welcome to your ghetto, {0}! ".format(user_in))

Other Questions
Assume Sheryl Jenkins wants to accumulate $ 13,241.39 in two years. She currently has $ 10,621.36 to invest. What interest rate must she earn on her investment (that is, if she deposits $ 10,621.36 today) to have $ 13,241.39 exactly two years from today? Can someone please help me! Which is the difference between an antibiotic and an antiviral? 1. 80 = -10b 2. 6 = 2n3. -16r = 321.2.3. Explain how homologous and the fossil records support evolution. Thanks so much!!! What is the area of the shaded part of the figure? Second time posting this. Please help!! :) A diver begins at 140 feet below sea level. She descends at a steady rate of 7 feet per minute for 4.5 minutes. Then, she ascends 112.2 feet. What is her current depth?Negative 549.3 feetNegative 59.3 feet59.3 feet549.3 feet 1. The structure that's not a component of wall of sponges is prove ||a+b|| ||a||+|b|| Who was Ignatius Loyola?a nobleman who joined the church and founded the Jesuitsa monk who traveled to Asia as a missionarya pope who called the Council of Trenta Protestant who convinced the Catholic Church to reform You own a stock portfolio invested 30 percent in Stock Q, 25 percent in Stock R, 25 percent in Stock S, and 20 percent in Stock T. The betas for these four stocks are .80, 1.18, 1.19, and 1.36, respectively. What is the portfolio beta Tanks Machine guns Poison gas Flamethrowers AirplanesThese new military technologies resulted in a huge expansion of the military tactic known as trench warfare and made _______ the most deadly war up to that point in history.a.Vietnamb.World War Ic.World War IId.American Civil War Question 6 of 25In APQR, m P= 60, m_ Q = 30, and m2 R = 90. Which of the followingstatements about APQR are true?Check all that apply. what is the difference between law and rule? Synovec Company is growing quickly. Dividends are expected to grow at a rate of 30 percent for the next three years, with the growth rate falling off to a constant 4 percent thereafter. If the required return is 10 percent, and the company just paid a dividend of $2.65, what is the current share price Explain the reciprocal relationship between human society and limiting factors Give the order of symmetry from the fig 3a)2b)3c)6d)4 Cu 2 State the syntactic function of the underlined parts:Example: He has learnt English for 3 years OdAdvocates of organic foods - a term (a) whose meaning varies greatly - frequently proclaim that such products are (b) safer and more nutritious than others. Mention any four challenge of sustainable development in nepal