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
The name atari comes from what
algol [13]

Answer:

JAPANESE

Explanation:

Have a nice day:)

3 0
3 years ago
PUBG mobile id and name plz
ycow [4]
KSK Jemens je Jemen jeme this is mine
5 0
3 years ago
One should take to prevent ulcers in the gastrointestinal tract?​
Andrew [12]

Answer:

food??

Explanation:

if you don't eat food, the acid produced in the stomach will break down the stomach walls instead of the food, giving you ulcers

7 0
3 years ago
8. If you, or someone you know is a victim of cyber-bullying what should you do? not say a word ,write mean things back ,report
bearhunter [10]

Answer:

report it

Explanation:

4 0
2 years ago
Read 2 more answers
What technology has had the most significant influence on engineering?
Lorico [155]
The wheel (: would be the correct answer
5 0
3 years ago
Other questions:
  • Which part of the cryosphere comes directly from the atmosphere?
    13·2 answers
  • The following method public String removeFromString(String old, String frag) removes all occurences of the string frag from the
    12·1 answer
  • Permission must be sought in order to use a play that is in the public domain. True or False?
    11·2 answers
  • Would you buy a 2017 SYM WOLF CLASSIC 150 for $2,999?<br><br> Just wondering.
    7·1 answer
  • What type of microscope requires a nonmetal sample to be prepared for viewing by coating it with a thin layer of a conductive ma
    9·2 answers
  • Write a recursive method called repeat that accepts a string s and an integer n as parameters and that returns s concatenated to
    7·1 answer
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • Samantha is in the beginning stages of OOP program development. What are the five steps she must follow for creating an OOP prog
    6·2 answers
  • Kyle returns to work the next day and he would like to continue working on the document from yesterday. What should Kyle do?
    7·1 answer
  • Mention five importance of taskbar​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!