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
nataly862011 [7]
3 years ago
8

Write a program that: program starts; declares and initializes to .06625 constant float variable NJSALES_TAX; declares and initi

alizes to 1000 an integer variable total; declares and initializes to zero a float variable grand_total; prompt and input on new line total; calculate grand_total to equal total plus (total*SALES TAX); if grand_total <= 1000 print on new line "Grand total is less than or equal to 1000 it is $" and the grand_total to two decimal places; else if grand_total between 1000 <= 2000 print on new line "Grand total is more than 1000 less than or equal to 2000 it is $" and the grand_total to two decimal places; else print on new line "Grand total is greater than 2000 it is $" and the grand_total to two decimal places; just before ending print on new line "Program finished!" then terminate program.
Computers and Technology
1 answer:
FromTheMoon [43]3 years ago
5 0

Answer:

Written in C++

#include<iostream>

using namespace std;

int main() {

const float SALES_TAX = 0.06625;

int total = 1000;

cout<<"Total: ";

cin>>total;

float grand_total = 0;

grand_total = total + total * SALES_TAX;

if (grand_total <= 1000) {

cout<<"Grand total is less than or equal to 1000 it is $";

printf("%.2f", grand_total);  

}

else if (grand_total > 1000 && grand_total <= 2000 ) {

cout<<"Grand total is more than 1000 less than or equal to 2000 it is $";

printf("%.2f", grand_total);  

}

else {

cout<<"Grand total is greater than 2000 it is $";

printf("%.2f", grand_total);  

}

cout<<"\nProgram finished!";

return 0;

}

Explanation:

<em>I've added the full source code as an attachment where I use comments to explain difficult lines</em>

Download cpp
You might be interested in
Excel spread sheets are primarily used to
Juli2301 [7.4K]

Answer:

work with numbers and text.

Explanation:

Spreadsheets can help organize information, such as alphabetizing a list of names or ordering records, and calculate and analyze information using mathematical formulas.

4 0
3 years ago
Read 2 more answers
A user clicked an email link that led to a website than infected the workstation with a virus. The virus encrypted all the netwo
Leno4ka [110]

Answer:

D

Explanation:

A zero-day vulnerability is a computer-software vulnerability that is unknown to those who would be interested in mitigating the vulnerability. Until the vulnerability is mitigated, hackers can exploit it to adversely affect computer programs, data, additional computers or a network. An exploit directed at a zero-day vulnerability is called a zero-day exploit, or zero-day attack.

5 0
3 years ago
Communication between a computer and a keyboard involves ______________ transmission.
4vir4ik [10]

Answer:

Simplex transmission

Explanation:

Communication between computer and keyboard involves which transmission? Answer: Simplex transmission requires communicating between a computer and a keyboard. The simple transmission & communication channel allows data from only one direction.

8 0
1 year ago
When a formula contains the address of a cell, it is called a(n)
Shalnov [3]
When a formula contains the address of a cell, it is called a c<span>ell reference.

hope this helps!</span>
8 0
3 years ago
How does a MIPS Assembly procedure return to the caller? (you only need to write a single .text instruction).
AnnyKZ [126]

Answer:

A MIPS Assembly procedure return to the caller by having the caller pass an output pointer (to an already-allocated array).

8 0
3 years ago
Other questions:
  • When looking through the documentation for a specific class, you never actually see the source code for that class. Instead, you
    6·1 answer
  • What is constructive criticism?
    9·1 answer
  • Information from the system that is used to make modifications in the input, processing actions, or outputs is referred to as: G
    9·2 answers
  • Select the correct answer.
    13·1 answer
  • Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on yo
    12·1 answer
  • One advantage of using personal computers for Internet access is that they have relatively large screens for viewing Internet co
    7·2 answers
  • Plz hurry it’s timed
    5·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • I’ll mark brainliest, thanks
    10·2 answers
  • If you use a new HTML5 input type (such as "range" or "number") on an older browser,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!