Question

Using WHILE loop. Create a simple C++ program for purchasing which contains an invoice number, amount of sale, and amount of sales tax. Calculate the sales tax as 5% of the sale amount. The program prompts the user for purchase details. When you prompt for an invoice number, do not let the user proceed until a number between 5,000 and 10,000 has been entered. When you prompt for a sale amount, do not proceed until the user has entered a nonnegative value. After a valid purchase has been created, display the invoice number, sale amount, and sales tax.

Expert Answer

1 Rating

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Engineering

Programing

Related Computer Engineering Q&A

Find answers to questions asked by students like you.

Q: Question No. 5:​​​​​​​​ Convert the following by showing all the steps necessary. a) (1001111)2 ​= ...

A: Note: We can only respond to a maximum of three sub-parts as per the guidelines. Please resubmit the...

Q: Question 2.2 Write a function createPassword()with no return value to randomly select 8 capital lett...

A: NOTE: - Since the programming language is mentioned, the below problem is implemented in C language....

Q: What are the characteristics of software?   Software is developed or engineered Software does “wea...

A: 1. i and iii Software is basically an application development and computer engineering which is prog...

Q: There are n customer of bank who took loan of different amounts (Entered by User) and for different ...

A: Algorithm: 1. Input Number of customers (n), Rate of Interest 2. Declare 2 arrays of size n to stor...

Q: Use c++ program

A: #include <iostream>using namespace std; class cms{    public:        string name;    int exper...

Q: Cache memory and RAM both are based on transistor based then why cache memory is needed if we alread...

A: Cache memory and Random Access Memory Cache memory and RAM both are based on transistor based then ...

Q: Write a c program with structures which contains information found in a library’s card catalog. It s...

A: program approach    include standard files structure for library’s card catalog. It contain : - ...

Q: Question 4: a) Which form of biometric technology do you prefer for identification purposes: fingerp...

A: Commonly used biometric technology Fingerprint biometrics is based on the recognition of specific p...

Q: 1.•  C# By who the programming language which In history to develop started? 2• C# Features what are...

A: Actually, C# is also a one of the programming language.

Q: I need a python program to write the csv file with the data contains about reservation details of 50...

A: Define module csv Define list variable names with elements to be set as row names Define list data w...

Q: Write a C++ function that takes an array and it’s size as parameters,then calculates and returns the...

A: The function is given in the next step that: takes array size and array as input and finds max and m...

Q: can you solve this in C language please

A: Program Plan:- Initialize all the necessary header files Declare the array with type double and siz...

Q: Find the topology of the network if Table below is the routing table for router R1. Mask Network ...

A: the routing table for R1 is given as  Mask Network Address Next-Hop Address Interface /27      ...

Q: PYTHON!!!(but we cant use input) Write a function that takes a number and returns the largest digit ...

A: GIVEN: Create a python program that returns the largest digit value in a number.   EXAMPLE: Number: ...

Q: When recursion is used to solve a problem, why must the recursive method call itself to solve a smal...

A: Actually, recursion is a function call it self.

Q: BbC ing 2 Heading 3 Title Homework 2 Consider Table 6-2 on P263 in the textbook. All duration estima...

A: Actually, network is a all devices communicate with each other.

Q: Matlab Question  Write a function called DivisibleTest(M) that loops through the values 1 through M ...

A: Matlab Code is   %function named DivisibleTest function DivisibleTest(M)       %for loop to run for ...

Q: Why Data Bus is bidirectional

A: Data bus is bidirectional :  It is a group of conducting wires which carries Data only. Data bus is ...

Q: Discuss about microcomputer with necessary diagram.

A: Microcomputer:- The microcomputer is a browser constructed as an embedded system on the basis of a m...

Q: A hot air balloon accelerates upward from rest at a rate of 0.5m/s. When the balloon is at a height ...

A: The python program is written where it calculates the velocity of the balloon. The math functions ar...

Q: Give the postfix expression for the tree given. (50 Puan) e a d)

A: Introduction of Postfix Expression: A tree is a non-linear data structure and there are three ways t...

Q: 1. Find the features by different manufactures that support Gigabit Ethernet and have at least 5 por...

A: Hey, since multiple questions posted, we will answer first question according to our policy. If you ...

Q: Give solution in C++ Language with secreenshoot s

A: Program Plan: 1. Initialize all the required header files. 2. Use the Switch Case for making menu dr...

Q: Consider a magnetic disk with 1000 cylinders rotating at a speed of 7200 revolutions per minute. The...

A: Given:- Total number of cylinders =1000 Number of Revolutions per minute = 7200 Sector size =1024 By...

Q: Which of the following factors does NOT cause the address (virtual or physical) of a specific variab...

A: Option B(Writing a '3' to /proc/sys/vm/drop_caches) is used to free os cache which can change addres...

Q: 5) Write the Truth table for the following logic gatesugmoo oy ni 8AJT. a) OR gate, b) AND gate, c) ...

A: Click to see the answer

Q: array for a maximum 20 numbers, the user will determine the total number to enterfrom keyboard. Then...

A: Declare an array of 20 numbers Input n values for each element in array       j from 2 to arr[i]    ...

Q: write this in c++ format function sequence(n){    var n = 10; // this is just for explanation you ca...

A: The values are to be stored in array 

Q: Draw the Crow’s Foot solution of the business rules given below: A driver may receive many (driving...

A: Explanation: The given crow foot diagram represents a many to many relationship (m:m) between DRIVE...

Q: can you write in C language

A: Note: Below is the required C program. Program Approach: Defining necessary header files Declaring ...

Q: Expression Conversion[Problem Description]Design a program which can tansfer an infix expression int...

A: #include <stdio.h> #include <string.h> #include <stdlib.h>  struct Stack {   int t...

Q: Develop a Python program to print the message that the number is prime or not.  Note: - not need to ...

A: Below is the required python program: - Program: - #Ask the user to enter the number num = int(input...

Q: 3) Describe the contribution of Charles Babbage and Ada Lovelace in computing

A: Contribution of Charles Babbage and Ada Lovelace in computing Ada Lovelace is known as world's firs...