Computer Science: A Structured Programming Approach Using C, Third Edition
Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
bartleby

Concept explainers

Question
100%
Book Icon
Chapter 3, Problem 39PS
Program Plan Intro

To create a code that asks the values representing the quantities of each item sold, calculates, and displays the customer copy of the bill for a company.

Program Plan:

Create a code that reads the quantities of each item from the user.

The code should calculate the bill and display it in the output.

The unit prices are as follows:

1 unit of TV=$400.00

1 unit of VCR=$220.00

1 unit of Remote Controller=$35.20

1 unit of CD Player=$300.00

1 unit of Tape Recorder=150.00

Blurred answer
Students have asked these similar questions
Write a program to create a customer’s bill for a company. The company sells only five different products: TV, VCR, Remote Controller, CD Player, and Tape Recorder. The unit prices are $400.00, $220.00, $35.20. $300.00, and $150.00, respectively. The program must read from the keyboard the quantityof each piece of equipment purchased. It then calculates the cost of each item, the subtotal, and the total cost after an 8.25% sales tax. The input data consists of integers representing thequantities of each item sold. These integers must be input into the program in a user-friendly way; that is the program must prompt the user for each quantity as shown below. The numbers in boldface italic show the user’s answers.
Write a program that reads the amount of a monthly mortgage payment andthe amount still owed—the outstanding balance—and then displays theamount of the payment that goes to interest and the amount that goes toprincipal (i.e., the amount that goes to reducing the debt). Assume that theannual interest rate is 7.49 percent. Use a named constant for the interest rate.Note that payments are made monthly, so the interest is only one twelfth ofthe annual interest of 7.49 percent.
Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.

Chapter 3 Solutions

Computer Science: A Structured Programming Approach Using C, Third Edition

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,