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
Network Architecture and Topology: Mastery Test
trasher [3.6K]

Answer:

You need to understand all the network typologies and the devices that we use in the Computer networks. You also use the techniques like routing, masking, firewalls, VPN, as well as the network protocol. And recently added is the PKI. And hence you need to make sure that you know all these, and you should also know ipv4 and ipv6. Rest you can consult Tanenbaum for further studies on Computer Network.

Explanation:

Please check the answer.

4 0
3 years ago
Write an assembly language program with a loop and indexed addressing that calculates the sum of all the gaps between successive
PSYCHO15rus [73]

Answer:

Description: Write a MASM 32bit program with a loop and indexed addressing that calculates the sum of all thegaps between successive array elements. The array elements are doublewords, sequenced in nondecreasing order.

;Include Irvine32.inc file used with link library for 32 bit applications

.386

.model flat,stdcall

.stack 4096

ExitProcess proto,dwExitCode:dword

INCLUDE Irvine32.inc

.data

myArray DWORD 0,2,5,9,10

arrSize = ($-myArray)/TYPE myArray

gapArr DWORD arrSize-1 DUP(?)

sum DWORD ?

.code

main PROC

;Call the procedure

call Clrscr

;Initialize ESI pointer

mov esi, 0

mov ecx, arrSize

dec ecx

L1:

mov eax, myArray[esi+4]

sub eax, myArray[esi]

mov gapArr[esi], eax

inc esi

loop L1

;Calculate the sum of gaps between array elements

mov sum, 0

mov esi, 0

mov ecx, arrSize

dec ecx

;  move gapArr[esi] to a temporary register and then add that register value to sum

L2:

mov edx, gapArr[esi]  

add sum, edx

inc esi

loop L2

       INVOKE ExitProcess,0

main ENDP

END main

Explanation:

7 0
3 years ago
Which one is not an operating system?1.mac 2.Microsoft office3.Iso.3.Android
quester [9]
It's either microsoft or office. Based on research I would say office.

I really hope this helps you! :-)
6 0
3 years ago
When text is used as a Hyperlink, it is usually underlined and appears as a different color.
Artist 52 [7]
True it usually shows up with a blue underline
7 0
3 years ago
What is true about music from the Romantic period?
avanturin [10]
The answer to the given question above is the third option: <span>It was longer and less constrained than the music of the Classical period. The Romantic Period in music actually has more freedom in design and form. During this period, music were even more artistic and intellectual as well. Romantic Period occurred the late 18th century until early 19th century.</span>
8 0
3 years ago
Read 2 more answers
Other questions:
  • Two electronics technicians are looking at the testing instrument in the figure above. Technician A says that this instrument is
    7·1 answer
  • Which statement is true about parity in RAM?
    11·1 answer
  • What kind of video are you are able to watch by downloading it from the Internet?
    10·1 answer
  • In what areas is leslie's underspending hurting her
    10·1 answer
  • Examine the exhibit above. "Device A" is an 8-port layer 2 managed switch and "Device C" is a 4-port hub. Which of the following
    13·1 answer
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    5·1 answer
  • How does natural gas move through pipelines from the well head to the end user thousands of miles away
    5·1 answer
  • What is missing in the following program in order to have the output shown?
    15·2 answers
  • What is the difference between electrical and electronic devices?
    5·2 answers
  • Identify a characteristic that is a disadvantage of cloud-based hosting.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!