answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
anygoal [31]
1 year ago
6

A large Internet merchandise provider determines its shipping charges based on the number of items purchased. As the number incr

eases, the shipping charges proportionally decrease. This is done to encourage more purchases. If a single item is purchased the shipping charge is $2.99. When customers purchase between 2 and 5 items, they are charged the initial $2.99 for the first item and then $1.99 per item for the remaining items. For customers who purchase more than 5 items but less than 15, they are charged the initial $2.99 for the first item, $1.99 per item for items 2 through 5, and $1.49 per item for the remaining items. If they purchase 15 or more items, they are charged the initial $2.99 for the first item, $1.99 per item for items 2 through 5, and $1.49 per item for items 6 through 14 and then just $0.99 per item for the remaining items. Allow the user to enter the number of items purchased. Display the shipping charges.
Computers and Technology
1 answer:
blsea [12.9K]1 year ago
7 0

Answer:

A C# programming language (console application) was used in this given question. below in the explanation section is the code used in executing the task that was carried out.

Explanation:

Solution

C# Programming language code (Console Application):

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;  

namespace ShippingProgram  

{

class Program  

{

public static double ShippingCharge(int items)  

{  

if(items==1)  

{  

return 2.99;  

}  

else if ((items>=2)&&(items<=5))  

{

return (2.99) + ((items - 1) * 1.99);  

}  

else if((items>5)&&(items<15))  

{  

return (2.99) + (4* 1.99)+((items-5)*1.49);  

}  

else  

{  

return (2.99) + (4 * 1.99) + ((10) * 1.49)+((items-14)*0.99);

}

}  

 static void Main(string[] args)  

{  

System.Console.Write("Enter the no of items: ");

int n = Convert.ToInt16(System.Console.ReadLine());

System.Console.WriteLine("Your shipping charges are: $"+ ShippingCharge(n));  

System.Console.ReadLine();  

}  

}  

}

You might be interested in
Declare a struct named PatientData that contains two integer data members named heightInches and weightPounds. Sample output for
boyakko [2]

Answer:

struct PatientData{

   int heightInches, weightPounds;

};

Explanation:

In order to declare the required struct in the question, you need to type the keyword <em>struct</em>, then the name of the struct - <em>PatientData</em>, <em>opening curly brace</em>, data members - <em>int heightInches, weightPounds;</em>, <em>closing curly brace</em> and <em>a semicolon</em> at the end.

Note that since the object - lunaLovegood, is declared in the main function, we do not need to declare it in the struct. However, if it was not declared in the main, then we would need to write <em>lunaLovegood</em> between the closing curly brace and the semicolon.

8 0
2 years ago
When should a technician record a system's baseline data?
bija089 [108]

Baseline data is a record of all the system performance specifications when the system is operating as designed. A technician should record a system's baseline data On a new system after it is installed.


3 0
2 years ago
What is printed by the following program provided all necessary standard header files are included? Explain each line of the out
Ostrovityanka [42]

<u>Output:</u>

f1 in A

f2 in A

f1 in B

f2 in A

f1 in A

f2 in A

f1 in B

f2 in B  

<u>Explanation:</u>

In this snippet, the code makes use of virtual functions. A virtual function is defined as a function that is defined in the base class and redefined in the derived class. If the derived function accesses the virtual function, the program will get executed with the derived class’s version of the function.

In this code, we define the virtual function f1() in class A and also redefine it in class B which is the derived class of A. While executing the program, the function g which takes the object b (class B’s object) as a parameter. It will print class B’s version of f1() rather than class A’s version. This is working off the virtual function.

8 0
2 years ago
Jeff wants to be an archeologist. He found the information below and wants to properly cite it for his own use. The information
saw5 [17]
<span>“Detail Report for 15-1199.11-Archeologist.” O*NET OnLine. n.p., 2012. Web. 5 May 2013.</span>
7 0
2 years ago
Read 2 more answers
Your computer has gradually slowed down. What's the most likely reason?
sweet-ann [11.9K]
It could be old ... could be your connection to the internet... could be a virus. You can go to walmart or your super store and buy a usb for your computer. There are ones that can speed up your computer. I had to buy it for mine and it worked. It might be over 20 dollars depends on where you go.
8 0
2 years ago
Other questions:
  • Elaine is upset with her group members because she wanted to lead the group but is not allowed to. She found that other group me
    9·2 answers
  • Which key retains its uniqueness even after you remove some of the fields?
    14·1 answer
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • You just got a shipment of 10 network-attached laser printers. You want these printers to always have the same address but you w
    12·1 answer
  • Which data type change will require the app builder to perform the additional steps in order to retain existing functionalities?
    14·1 answer
  • Your friend Margo is considering what type of display to purchase with her new desktop computer and she asks you for advice. You
    14·1 answer
  • A 1.17 g sample of an alkane hydrocarbon gas occupies a volume of 674 mL at 28°C and 741 mmHg. Alkanes are known to have the gen
    14·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • In the graph shown here, by what percentage are the number of people in computer occupations in general projected to increase?
    10·2 answers
  • In a particular field, there are trees in a l single row from left to right. Each tree has a value V You cut trees from left to
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!