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]
4 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]4 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
Both the original location and destination must be visible in file explorer when you
Xelga [282]

When you drag-and-drop files

Dragging and dropping files between two open windows is a quick way to transfer files and folders. If the file or folder and both the original and destination location where you want to transfer it are visible, you can simply drag the item/items from one location to the other. Dragging is unlike moving a file of folder. Dragging from one disk to another copies the file/folder so that it appears in the two locations.

5 0
3 years ago
Which statement describes a mobile device feature? Docking stations can add some functionality to mobile devices such as video o
pogonyaev

Answer:

<em>The statement that describes a mobile device feature is docking stations can add some functionality to mobile devices such as video output.</em>

Explanation:

Because a docking station is a device that connects a mobile to multiple peripherals. It provides a single connection point that allows a mobile to function like a desktop computer.

8 0
4 years ago
Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
Nina [5.8K]

Answer:

#include <stdio.h>

int fib(int n) {

 if (n <= 0) {

   return 0;

 }

 if (n <= 2) {

   return 1;

 }

 return fib(n-1) + fib(n-2);

}

int main(void) {

 for(int nr=0; nr<=20; nr++)

   printf("Fibonacci %d is %d\n", nr, fib(nr) );

 return 0;

}

Explanation:

The code is a literal translation of the definition using a recursive function.

The recursive function is not per se a very efficient one.

4 0
3 years ago
What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
4 years ago
What is the purpose of an IP address? A. identifying source and destination of data B. creating images on websites C. drawing ta
natka813 [3]

Answer:

The Answer is A. I could be wrong though.

3 0
3 years ago
Read 2 more answers
Other questions:
  • David has a laptop that is having a problem with the video system. You believe the problem might be the backlight. During your r
    13·1 answer
  • A color tv uses red, green, and blue phosphors to produce the colors that we see. in printing, however, we use magenta, yellow,
    10·1 answer
  • List three examples of observations of earth by remote-sensing satellites
    6·1 answer
  • Does it matter if watch comes without box and papers
    10·1 answer
  • Write a program that reads a series of strings andprints only those strings beginning with the letter "b."
    7·1 answer
  • The _____ model of a systems development life cycle provides for progressive development of operational software, with each rele
    8·1 answer
  • What is a resume?A collection of all your professional and artistic works.A letter which explains why you want a particular job.
    6·1 answer
  • When considering the best technology for its particular use, what should a business consider
    15·2 answers
  • Could some please answer the question in the pictures? Thank you!! I will also give your brainliest if you give me the right ans
    11·1 answer
  • The capacity of your hand drive is measured in​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!