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
Vinvika [58]
3 years ago
11

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

total of the sale, the amount of sales tax, and the total. Assume the sales tax is 6 percent.
P.S. must be shown in psuedocode.
Computers and Technology
1 answer:
kykrilka [37]3 years ago
5 0
What language are you programming in? 

<span>If you are programming in C or C++, you could do something like this: </span>

<span>#include <iostream> </span>
<span>using namespace std; </span>

<span>int main(void) </span>
<span>{ </span>
<span>//declarations </span>
<span>double item1 = 0; </span>
<span>double item2 = 0; </span>
<span>double item3 = 0; </span>
<span>double item4 = 0; </span>
<span>double item5 = 0; </span>
<span>double subtotal = 0; </span>
<span>double total = 0; </span>
<span>double tax = 0; </span>

<span>//Enter Items </span>
<span>cout << "Please enter the price of item 1"; </span>
<span>cin >> item1; </span>

<span>cout << "Please enter the price of item 2"; </span>
<span>cin >> item2; </span>

<span>cout << "Please enter the price of item 3"; </span>
<span>cin >> item3; </span>

<span>cout << "Please enter the price of item 4"; </span>
<span>cin >> item4; </span>


<span>cout << "Please enter the price of item 5"; </span>
<span>cin >> item5; </span>


<span>//Compute subtotal </span>
<span>subtotal = (item1 + item2 + item3 + item4 + item5 + item6); </span>

<span>//Compute amount of tax </span>

<span>tax = subtotal * (.06); </span>

<span>//Compute total </span>

<span>total = subtotal + tax; </span>

<span>//Display subtotal, total, and amount of tax </span>

<span>cout < " The subtotal of the sale is: " << subtotal << endl; </span>
<span>cout < " The amount of sales tax is: " << tax << endl; </span>
<span>cout < " The total of the sale is: " << total << endl; </span>

<span>return 0; </span>

<span>}//end of function main </span>


<span>I know this is a very very basic C++ program but I hope it helps and good luck on your project!</span>
You might be interested in
If a computer reboots itself on its own the computer might have a(n)
MissTica

Answer:

D. Software Problem

Explanation:

It could be that the software is bootlooping which will power on and off until its fixed.

4 0
3 years ago
What command embeds a new spreadsheet object at the insertion point?
Debora [2.8K]
The correct answer is A. Table Object > Excel Spreadsheet

 

To be more precise- Click on INSERT on the ribbon tab in Microsoft Office. You will see a button labeled OBJECT. You can then scroll down and pick Excel Spreadsheet in the drop down menu.


6 0
3 years ago
Read 2 more answers
One of the most common causes of fires in the home and workplace is: a. All of the answer choices b. Arson c. Candle d. Faulty e
solniwko [45]
Electricity is one of the most common causes of fire in homes and workplaces. Electrical accidents appear to be caused by a combination of two factors: 1. Unsafe equipment and/or installation; 2. Workplaces made unsafe by the environment

So the answer would be D)Faulty electricity
8 0
3 years ago
Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho
cupoosta [38]

Answer:

Following are the program in java language:

import java.util.*; // import package

public class Main

{

public static void main(String[] args) // main method

{

 int num; // integer variable declaration

 double r; //double varaible declaration

 char ch; // char variable declaration

Scanner scnr=new Scanner(System.in); // creating the instance of scanner

 System.out.println("Enter the string:");

 String str=scnr.nextLine(); // reda string by user

System.out.println("Enter the integer value:");

 num=scnr.nextInt(); // Read integer value by the user

 System.out.println("Enter the Double value:");

 r=scnr.nextDouble(); // read double value by user

 System.out.println("Enter the character value:");

 ch= scnr.next().charAt(0); // read character by user

 System.out.print(num + " ,"); // display them in a single line

 System.out.print( " " +r +" ,");//dislpay in a single line  

  System.out.print( " " +ch +",");//dislpay in a single line

 System.out.print(" " +str);//dislpay in a single line

}

}

Output:

Enter the string:

ram

Enter the integer value:

34

Enter the Double value:

45.789

Enter the character value:

r

34 , 45.789 , r, ram

Explanation:

Following are the description of program

  • Read the integer ,string,char,double value by the user by using scanner class in "num","str","ch" and "r" variable respectively
  • Print that value in a single line separated by comma by System.out.println statement.

7 0
3 years ago
Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with
poizon [28]

Answer:

An answer to this question is given below in explanation section.

Explanation:

The given question is incomplete. First, we write the complete question that is:

Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with Server S. Run telnet in a terminal and capture the traffic on Wireshark. For example, open a telnet session using this command: "telnet cs537.cs.csusm.edu". What are the source and destination port numbers for the following items?

  1. the segment sent from A to S.
  2. the segment sent from B to S.
  3. the segment sent from S to A.
  4. the segment sent from S to B.
  5. if A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S?
  6. how about if they are the same host?

Answers

                           Source Port Numbers               Destination Port Number

  1. A -> S                      1467                                               23
  2. B -> S                       1513                                               23
  3. S->A                         23                                                  1467
  4. S->B                         23                                                  1513
  5. Yes, it is that the source port number in the segement from A to S is the same as that from B to S. In short, there is no relationship between port numbers on different hosts
  6. no, a port number identify UNIVOCALLY a process.

5 0
3 years ago
Other questions:
  • What is a common method for testing a spot weld?
    13·1 answer
  • Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O
    5·1 answer
  • Reed Hastings created Netflix. His inspiration came from the fact that he had to pay a sizeable late fee for returning a DVD bey
    12·1 answer
  • Which of the following is true regarding the mod operator, %? Group of answer choices It can only be performed on int values and
    8·2 answers
  • What is an Apple Pen?
    5·2 answers
  • HELP PLEASE
    7·1 answer
  • Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions, like M
    5·1 answer
  • RSA encryption relies on
    15·1 answer
  • ______________ are used to store information that will be referenced and manipulated in a computer program. They label data with
    6·1 answer
  • Once you select a theme, you__________ change the theme’s individual elements independently of each other.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!