An online retailer sells five products whose retail prices are as follows: product 1, $$2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49 and product 5, $6.87. Write an application that reads a series of pairs of numbers as follows: a) product number b) quantity sold Your program should use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to determine when the program should stop looping and display the final results.

Answers

Answer 1

Answer:

#include <stdio.h>  

int main()

  {

  float list[5]={2.98,4.50,9.98,4.49,6.87   };

  int producttype=0;

  int qty;

  double total=0;

  printf("Below is the List of Products with Price\n");

  for(int i=0;i<5;i++)

  {

      printf("Product%d Price is %.2f\n",i+1,list[i]);

  }

  printf("\nEnter pairs of Product Numbers and Its Quantities.\n");

  printf("Enter -1 for the Product Number to end input.\n");

  while(true){

     

      scanf("%d",&producttype);

      if(producttype == -1)

      {

      break;  

      }

      scanf("%d",&qty);

     

      switch(producttype){

         

          case 1:

              total=total+qty*2.98;

              break;

          case 2:

              total=total+qty*4.50;

              break;

          case 3:

              total=total+qty*9.98;

              break;

          case 4:

              total=total+qty*4.49;

              break;

          case 5:

              total=total+qty*6.87;

              break;

          default:

              printf("Wrong Product Id\n");

              break;    

      }

 }

  printf("Sum of the purchases is :%.2f\n",total);

}

Output:-

An Online Retailer Sells Five Products Whose Retail Prices Are As Follows: Product 1, $$2.98; Product

Related Questions

The "muscles" of a computer are called the Central Processing Unit (CPU).
O True
O False

Answers

Answer:

false

Explanation:

Which three pieces of information must you include in a project goals document? (Choose 3)
A) Target audience
B) Project deadline
C) Project purpose
D) Color palette
E) Hero image

Answers

Answer:

A) Target audience

B) Project deadline

C) Project purpose

Explanation:

The project goals document outlines the scope of the project, detailing what the project entails to everyone that is to work on the project such that the objectives to focused on, the tasks to be completed, the timeline and deadline of the project, the project participants, and audiences are known or understood, thereby placing everyone in the project team on track

The three pieces of information that must be included in a project are therefore; the target audience of the document, the deadline of the project, clearly stated, and the purpose of the project; what the project is going to accomplish

The three pieces of information you must include in a project goals document are:

A) Target audience B) Project deadline C) Project purpose  

According to the given question, we are asked to show the  three pieces of information you must include in a project goals document and why they are important when making a project goal.

As a result of this, we can see when making a project goals document, it is important to include the target audience, project deadline and the project purpose because it gives the project a clear objective and deadline which can be achieved.

Read more here:

https://brainly.com/question/17293938

The head of small organization wants to install a network so that all the employees of different department can share various resources: I. What type of network he/she needs to set up in the organization? II. Name the resource that the employees will be able to share after setting up the network. ​

Answers

Answer:

While the Internet was evolving and creating a way for organizations to connect to each other and the world, another revolution was taking place inside organizations. The proliferation of personal computers inside organizations led to the need to share resources such as printers, scanners, and data. Organizations solved this problem through the creation of local area networks (LANs), which allowed computers to connect to each other and to peripherals. These same networks also allowed personal computers to hook up to legacy mainframe computers.

An LAN is (by definition) a local network, usually operating in the same building or on the same campus. When an organization needed to provide a network over a wider area (with locations in different cities or states, for example), they would build a wide area network (WAN).

CLIENT-SERVER

The personal computer originally was used as a stand-alone computing device. A program was installed on the computer and then used to do word processing or number crunching. However, with the advent of networking and local area networks, computers could work together to solve problems. Higher-end computers were installed as servers, and users on the local network could run applications and share information among departments and organizations. This is called client-server computing.

INTRANET

Just as organizations set up web sites to provide global access to information about their business, they also set up internal web pages to provide information about the organization to the employees. This internal set of web pages is called an intranet. Web pages on the intranet are not accessible to those outside the company; in fact, those pages would come up as “not found” if an employee tried to access them from outside the company’s network.

EXTRANET

Sometimes an organization wants to be able to collaborate with its customers or suppliers while at the same time maintaining the security of being inside its own network. In cases like this a company may want to create an extranet, which is a part of the company’s network that can be made available securely to those outside of the company. Extranets can be used to allow customers to log in and check the status of their orders, or for suppliers to check their customers’ inventory levels.

Sometimes, an organization will need to allow someone who is not located physically within its internal network to gain access. This access can be provided by a virtual private network (VPN). VPNs will be discussed further in the chapter 6 (on information security).

The term platform as a service has generally meant a package of security services offered by a service provider that offloads much of the security responsibility from an enterprise to the security service provider. Select one: True False

Answers

Answer:false

Explanation:

define data and user with example​

Answers

Answer:

Any data the user creates or owns. The term user data may be used to emphasize that the data were created and owned by the user. For example, when deleting an application, an uninstall program may ask if user data is also to be deleted.

Explanation:

Hope this helps you. Have a nice day^_^

Which category was originally developed to protect both digital and hard-copy sensitive information?

Answers

Answer:

Information assurance

Explanation:

Information assurance was originally developed to protect both digital and hard-copy sensitive information.

Why are programming languages like Java and Python ideal for rapid development?

Answers

Because Java, as well as Python, are high-level programs that don't need generating or parsing, they are perfect for quick development. This implies that engineers can code a program without testing it first and then publishing it.

What are programming languages?

A method of nomenclature for creating software applications is known as a computer program. The majority of formal programming are text-based, though they can also be graphical.

A substantial rise in the use of Python for machine learning and data analysis supports its status as the programming with the biggest growth. Python is a programming language with dynamic typing, while Java is a structured query and compiler language. Java is faster at play and simpler to debug thanks to this one difference, while Python is simpler to utilize and read.

Learn more about programming languages, Here:

https://brainly.com/question/12696037

#SPJ5

Hey, um guys help me as my laptop will not turn off properly as whenever i turn it off, it will turn back on by me pressing a key please help!!! URGENT!!!

Answers

Answer:

hold the power key until you restart.

Explanation:

how is internet connection made possible.​

Answers

Answer:

To connect to the Internet and other computers on a network, a computer must have a NIC (network interface card) installed. A network cable plugged into the NIC on one end and plugged into a cable modem, DSL modem, router, or switch can allow a computer to access the Internet and connect to other computers.

You are concerned about attacks directed at your network firewall. You want to be able to identify and be notified of any attacks. In addition, you want the system to take immediate action to stop or prevent the attack, if possible. Which tool should you use

Answers

Answer:

Intrusion Prevention System (IPS)

Explanation:

Firewall can be defined as a network security device that monitors incoming and outgoing network traffic and decides whether to allow or block specific traffic based on a defined set of security rules.

Simply stated, a firewall is a network security protocol that monitors and controls inbound and outbound traffic based on set aside security rules.

A firewall is used to control access to a computer or network, as it creates a barrier between a computer or a network and the internet in order to protect against unauthorized access.

Basically, it is a network security device or security system pre-installed on most computers to essentially inspect data being transmitted to or from a computer

Thus, the tool you should use is an intrusion prevention system (IPS).

Rachel is a junior system administrator for a network with a single Active Directory domain. The network has just expanded to include an additional subnet. Rachel has installed a new server running Windows Server 2016 on the new subnet and configure it as a DHCP server. When she checks the server icon in the DHCP Management console, she notices the server has a down icon. The DHCP server service has started, but the server does not respond to DHCP lease requests. What should Rachel do to solve the problem

Answers

Answer: Ask a member of the Enterprise Admins group to authorize the server.

Explanation:

From the information given, we are informed that Rachel installed a new server running Windows Server 2016 on the new subnet and configure it as a DHCP server but then realizes that the DHCP server service has started, but that the server does not respond to DHCP lease requests.

In this case, the reason for this can be attributed to the fact that the server hasn't been authorized, therefore, she can ask a member of the Enterprise Admins group to authorize the server.

An attacker uses an exploit to push a modified hosts file to client systems. This hosts file redirects traffic from legitimate tax preparation sites to malicious sites to gather personal and financial information. What kind of exploit has been used in this scenario

Answers

DDoS hope this helps :3

what allows an individual or company to share a post with an audience however they are designed to be used with mobile devices and limit the size of posts

Answers

Answer:

E-mail

Explanation:

The sending of messages via the Internet is known as e-mail. It is one of the most often utilised functionalities for sending text, files, pictures, and other attachments across a communications network.

A podcast lets a person or corporation to share articles with an audience, but it is geared for usage on mobile devices and has a capacity restriction.

Which information is required when designing a field? check all that apply.

Answers

Answer:

Explanation:

dimensions or calculation

Selena owns a bakery. She wants to compare the number of pies, cookies, cakes, and brownies that she sells in one month. Which charts are appropriate for this task? Check all that apply.

Answers

Column, line, bar, and possibly pie.

Answer:

Column, Bar, And Pie

Explanation:

got it right

can you fart and burp at the same time?

Answers

Answer:

Yes you can

Explanation:

Although farting and burping at the same time is a very rare phenomenon, it’s very possible. When this happens at the same time it is usually called a Furp.

This occurrence usually happens when there’s a lot of intake of foods which have a large percentage of gas . These gases often need to be expelled through processes such as burping and farting.

what is the right thing to do when you spot fake news​

Answers

Answer:

to tell the truth

Explanation:

l mean there is no reason to keep it secret

write the function of storage unit​

Answers

Answer:

A storage device is any type of computing hardware that is used for storing, porting or extracting data files and objects. Storage devices can hold and store information both temporarily and permanently. They may be internal or external to a computer, server or computing device.

please mark me as brainliest

Guys can anyone tell me answer from this photo Get Branilliest

Answers

Answer:

1. A computer itself

2.I don't no

What are the advantages of Radio waves over micro waves?​

Answers

Answer:

radio frequencies can penetrate deeply into the material and thus heat thick products. They heat more slowly than microwaves and thus make it possible to treat more delicate products which require a slower heating.

Define Data communication​

Answers

Explanation:

Data transmission and data reception is the transfer and reception of data over a point-to-point or point-to-multipoint communication channel. Examples of such channels are copper wires, optical fibers, wireless communication channels, storage media and computer buses. 

are the exchange of data between two devices For data communications to occur, the communicating devices must be part of a communication system made up of a combination of hardware

Write the contribution of Charles Babbage in the history of computer.​

Answers

Answer:

The main contributions of Charles Babbage are;

1 ) He invented difference engine and analytical engine.

2) He gave basic concept of of mathematics in his analytical engine.

3) He also keep the concept of using binary digits in his machine.

4) He had led to the the foundation of modern computer in his analytical engine including the concept of of input, processing and output

Hope it helps.... :)

General purpose computer can perform a single task, true or false​

Answers

Answer:

This is false.

Explanation:

General-purpose computers are desktop computers or laptops that can function in multiple ways. A special-purpose computer is usually designed to do one thing only.

8. Compare the advantages and disadvantages of using a smartphone rather than a laptop computer for creating a report.​

Answers

Answer: the advantage of using a smartphone rather than a laptop computer is that you can talk to people across the world, call people, make texts, and get easy access to the internet. but the disadvantages are that a lot of people stay inside their house because of phones, not getting enough exercise.

Explanation:

The advantages and disadvantages of using a smartphone rather than a laptop computer for creating a report. have been compared below.

The advantages of using a smartphone rather than a laptop computer are;

Portability; Smartphones are portable enough that they can fit into pockets and some purses and as such can be taken with you anywhere easily unlike a laptop computer that doesn't have such physical property.Cost; Smartphones are largely cheaper than the average laptop computer. Thus, cost is a good factor.

Disadvantages of using a smartphone rather than a laptop computer are;

Screen size; Smartphone screen size are always smaller than that of laptop computers .Software's; Smartphones can't run many of the type of powerful software's that can run on laptop computers.Data entry and user input; Due to the portability of smartphones, their keyboards are usually smaller than that of laptop desktops which makes data entry more difficult for those that have big fingers.

Read more about smartphones and laptops at; https://brainly.com/question/21283135

which are the four different methods of formatting text in libreoffice writer​

Answers

Answer:

The Text Formatting Bar that is displayed when the cursor is in a text object, such as a text frame or a drawing object, contains formatting and alignment commands.

if my answer helps you than mark me as brainliest.

Binary 10110 into oct & hex Binary 10001 into oct & hex with full process​

Answers

Answer:

yes binary 10001into oct hex with full process.

You are the IT Director for Stormwind training studios. Your company has decided to start using Microsoft Intune for all of their software deployments. You want to set up a notification system so that you see all alerts and your IT Manager only gets notified for Critical alerts. How do you accomplish this

Answers

Answer:

Well, if the IT Manager gets only critical alerts on a phone, then the IT Manager has to go to settings and make sure to have all alerts on.  

Explanation:

The IT Manager, probably has his notifications, critical alerts, on only. So the IT Manager should have his notifications to ALL. Where he will be able to see all of the alerts.

Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hires that need onboarding with user accounts. When Travis looks at all the existing account names, he notices there is no common naming system. Where should he look to try to give the new hires user accounts with proper naming conventions

Answers

Answer:

The company's account policy

Explanation:

If there's no common naming system, It's best to go with the company's account policy.

2. Give technical terms for
a) A feature which computer never gets tired.
b) A memory to be used on fifth generation of computer.
c) Computer that used continues data
. d) An illegal activity that harms people by using computer.
e) A machine developed by Charles Babbage in 1833AD. ​

Answers

Answer:

Cccccccccccccccccccccccccccccccccc

4 effect by which we can see several keyframes at once is
a. Onion Skin b. Layer Effect o c. Timeline Effect
5. You can control the speed of animation by increasing or decreasing the value in
a. Timeline a b. Fps Box O ㅁ c. Tools Panel
Write T for True and 'F' for False statements.
1. Pencil2D has autosave option for saving your work after every few minutes
2. The source code of Pencil2D is not available for users.
3. You cannot erase unwanted part of object or drawing on the stage 4. Hand tool is used to quickly move different parts of the stage. 5. Bitmap layer is used for raster graphics, which is made up of pixels.
Fill in the blanks.
1. Pencil2D is used to create animation using and graphics
2. The big white rectangle in the middle of your screen is called the
3. The is used to mark current frame displayed on the stage.
4 You can a layer to clearly identify it in the timeline.
5. Frame is the little in the Timeline, in which we create an image
6. You can fill color in your enclosed drawing or shape with tool.​

Answers

Onion skin
Onion timeline stage
Other Questions
meaning of hatred in grammar 5/2+9/8-250+32 rationalise the denominator and simplify who was the first brain special Language Arts, FictionQuestion 2Characters that are not well-developed and sometimes stereotyped. ly and the Family Stone, not only introduced "slap bass" playing to Funk music, but also created their own version of love ballads that relied heavily on the overall bass sound. In the song "If You Want Me To Stay" instead of using a soft, slow endearing feel, the band uses a funky groove. But, rather than the drums, do they use the bass to drive the band?-- Allied Co has cumulative preferred stock with a $100 par value and a 12 percent annual dividend. No dividend has been paid for the past two years. What must the preferred stockholders be paid prior to paying the common stockholders Find the measure of angle x in the figure below:A triangle is shown. At the top vertex of the triangle is a horizontal line aligned to the base of the triangle. The angle formed between the horizontal line and the left edge of the triangle is shown as 57 degrees, the angle formed between the horizontal line and the right edge of the triangle is shown as 61 degrees. The angle at the top vertex of the triangle is labeled as y, and the interior angle on the right is labeled as 67 degrees. The interior angle on the left is labeled as x. 35 47 51 62 Select the correct answer.Which graph represents this equation?Y=3/2x to the second -6x rearrange this sentence and form a meaningful sentence 1) since/a/pollution/January/lot/increased/has2) . Versatility/Ruskin Bond/of/a/is/great/writerPlz say answer Solve 7 ( x + 1 ) + 2 = 5x + 15 Budgeted overhead for Cinnabar Industries at normal capacity of 30,000 direct labor hours is $6 per hour variable and $4 per hour fixed. In May, $310,000 of overhead was incurred in working 31,500 hours when 32,000 standard hours were allowed. The overhead volume variance is Group of answer choices $10,000 favorable. $11,000 favorable. $5,000 favorable. $8,000 favorable. The Director of Information Technology for the city of Tampa, Florida formed a company to sell computer supplies and software. All purchases made on behalf of the City were made from her company. She was later charged with fraud for overcharging the City, but was not convicted by a jury. The control issue in this case arose because the Director had both ________ and ________ duties. HEEEEEEEEEEEEEEEEEEEELP A differentiation strategy allows a company to charge a(n) __________ price for its product, if it chooses to do so. a. premium b. exorbitant c. low d. average e. escalating ANSWER RIGHT ILL BRAINLIST Why are independent agencies separate from the executive branch?A. Independent agencies have areas of responsibility that fall outside the executive branch.B. Independent agencies serve limited purposes within all three branches of government.C. Independent agencies serve many purposes across all three branches of government.D. Independent agencies do not share any of the responsibilities of the executive branch. Which of the following symbols is circled in red on the map below? Wood used in the production of furniture. select a type of costs 2. Fuel used in delivery trucks. select a type of costs 3. Straight-line depreciation on factory building. select a type of costs 4. Screws used in the production of furniture. select a type of costs 5. Sales staff salaries. select a type of costs 6. Sales commissions. select a type of costs 7. Property taxes. select a type of costs 8. Insurance on buildings. select a type of costs 9. Hourly wages of fur A ball is thrown straight up into the air from an initial height of 5 feet at time t = 0. The height, in feet, of the ball above the ground is given by h(t), where t is measured in seconds for 0 t 15. Based on the values of t and h(t) given in the table, for which value of t would the speed of the ball most likely be the greatest?t (seconds) 0 3 6 9 12 15h(t) (feet) 5 12 15 11 6 0Select one:a. 2 secondsb. 5 secondsc. 9 secondsd. 15 seconds drraw a well lablled of cell an atom that gained an electron is called