1answer.
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
hjlf
3 years ago
8

A customer in a store is purchasing five items. Write a program that asks for the price of each item, and then displays the subt

otal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent. Display all results, properly labeled, as numbers with two digits after the decimal point.
Computers and Technology
1 answer:
iren2701 [21]3 years ago
5 0

Answer:

Program approach:-

  • Using the header file.
  • Using the standard namespace I/O.
  • Define the main function.
  • Display the enter price of 5 terms.

Explanation:

Program:-

//header file

#include<iostream>

#include<iomanip>

//using namespace

using namespace std;

//main function

int main(){

       const double SALES_TAX=0.07;

       double subTotal=0,total=0,taxAmount = 0,x;

       

       cout<<"Enter price of 5 items"<<endl;

       for(int j=0;j<5;j++){

               cin>>x;

               subTotal += x;

       }

       taxAmount = subTotal * SALES_TAX;

       total = taxAmount + subTotal;

       cout<<fixed<<setprecision(2)<<endl;

       cout<<"Sub total: "<<subTotal<<endl;

       cout<<"Sales Tax: "<<taxAmount<<endl;

       cout<<"Total: "<<total<<endl;

       

       

}

You might be interested in
What feature does google docs have to allow users to work in a document?​
Pavel [41]

Answer:

Share.

Explanation:

Go to the Share button in the top right corner of the doc, and click it. Then type the email adress of who you want to work on it. (make sure the symbol to the right of the email is a little pencil Icon)

6 0
3 years ago
Interest groups are a new political force never envisioned by the Founders. simply reflect the conflictual nature of American po
DiKsa [7]

Answer:

simply reflect the conflictual nature of American politics.

Explanation:

Interest groups simply reflect the conflictual nature of American politics.

3 0
3 years ago
Consider a relation about people in the United States, including their name, Social Security number, street address, city, state
andreyandreev [35.5K]

Answer:

For constructing relational schema, consider the relation as:

Data Attributes for USPeople: name, Social Security number (SSN), street address, city, state,

ZIP code, area code, phone number

1. Functional Dependency (FD):

A functional dependency (FD) is a relationship between the primary key and non-key attributes of  the relation. For finding FD, we need to know about the primary key (PK) which should be unique.

Social Security number (SSN) is the only attribute that holds unique value for relation. R, attribute for any relation Y is functionally dependent on attribute X (usually the PK), if for every  valid instance of X, that value of X uniquely determines the value of Y.

Social Security number (PK) ->;name, street address, city, state, ZIP code, area code, phone  number

2. keys for the relation

Primary key = Social Security Number (PK)

Foreign key = Area code

In the normalization process, we can separate address table (street address, city, state, ZIP  code, area code)

Can an area code straddle two states?

Yes, it can straddle between two states; it might be in cities/regions that “lie” across two states.  For example, Kansas City is in Missouri and Kansas. A lot of people share the same area code.

Can a ZIP code straddle two area codes?

Yes, it can straddle between two states; it might be in cities/regions that “lie” across two states.

Can same Social Security number is allotted to two people?

NO, everyone has a unique SSN number.

Can peoples living together have the same address or phone number?

Yes, people living in the same house share addresses or phone numbers.

4 0
3 years ago
Im being timed please help!!
astra-53 [7]

Answer:

ALL

Explanation:

Because if it was a test you can ask a teacher, if it was group projects you can ask the study group, if it was homework or 1 on 1  you can ask a tutor

7 0
4 years ago
Read 2 more answers
What kind of resources can we share over the network? Plzzzzzzzz help!!!!!!
lubasha [3.4K]

Sharing network resources requires abiding by certain constraints, as follows:

<span>Security: Organizations present ongoing opportunities for unauthorized shared resources. Security mechanisms should be implemented to provide efficient parameters.Compatibility: Various client-server operating systems may be installed, but the client must have a compatible OS or application to access shared resources. Otherwise, the client may encounter issues that create communication delays and requires troubleshooting.Mapping: Any shared OS hardware drive, file or resource may be accessed via mapping, which requires a shared destination address and naming conventions.<span>File Transfer Protocol (FTP) and File Sharing: FTP is not affected by shared resources because the Internet is FTP’s backbone. File sharing is an LAN concept.</span></span>
3 0
4 years ago
Read 2 more answers
Other questions:
  • While adding voices to an animation, what kind of room should you choose?
    11·1 answer
  • Which statement correctly describe the FAFSA
    5·2 answers
  • Basically, if for every row, the absolute value of the entry along the main diagonal is larger than the sum of the absolute valu
    10·1 answer
  • If an appliance consumes 500 W of power and is left on for 5 hours, how much energy is used over this time period?
    5·1 answer
  • Tanya wants to create an sql query to fetch records from a table. which is the first word she has to type to write the query?
    7·1 answer
  • What happens if the ratio of cache hit is more than cache miss in a system?
    9·1 answer
  • Write a method max() which take a generic singly linked list as an argument and returns the maximum element reference in the lis
    10·1 answer
  • import java.util.Scanner; public class StudentScores { public static void main (String [] args) { Scanner scnr = new Scanner(Sys
    5·1 answer
  • What program is best for teaching young people code?
    13·1 answer
  • A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!