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
rosijanka [135]
3 years ago
12

. The electric company charges according to the following rate schedule: 9 cents per kilowatt-hour (kwh) for the first 300 kwh 8

cents per kwh for the next 300 kwh (up to 600 kwh) 6 cents per kwh for the next 400 kwh (up to 1,000 kwh) 5 cents per kwh for all electricity used over 1,000 kwh Write a function to compute the total charge for each customer. Write a main function to call the charge calculation function using the following data: Customer Number Kilowatt-hours Used 123 725 205 115 464 600 596 327 … … The program should print a three column chart listing the customer number, the kilowatt hours used, and the charge for each customer. The program should also compute and print the number of customers, the total kilowatt hours used, and the total charges.
Computers and Technology
1 answer:
densk [106]3 years ago
7 0

Answer:

here, hope it helps.

Explanation:

#include<iostream>

using namespace std;

int calculate(int N)

{

int rate=0;

for(int count=1;count<N;count++)

{

if(count<=300)

rate=rate+9;

else if(count<=600)

rate=rate+8;

else if(count<=1000)

rate=rate+6;

else

rate=rate+5;

}

return rate;

}

void main()

{

int costumer[20];

int wats[20];

int rates[20];

int i=0;

cout<<"please enter the information for the costomers below 0 to stop"<<endl;

while (costumer[i-1]!= 0)

{

cout<<"please enter the number of the coustomer "<<endl;

cin>>costumer[i];

if(costumer[i]==0)

break;

cout<<"please enter Kilowatt-hours used for the costumer "<<endl;

cin>>wats[i];

i++;

}

for(int j=0;j<i;j++)

rates[j]=calculate(wats[j]);

for(int j=0;j<i;j++)

{

cout<<" Customer Number Kilowatt-hours used charge"<<endl;

cout<<" "<<costumer[j]<<" "<<wats[j]<<" "<<rates[j]<<endl;

}

}

You might be interested in
In a @return tag statement the description:
Bond [772]

Answer:

Option A is the correct choice answer for the above question.

Explanation:

The programming concept says that every function returns some value. If the return value is not defined by the user then the function returns the garbage value otherwise it returns the defined value by the user.

The return value is defined by the user with the help of the "return" statement and with the help of the following syntax-

return value; // The return statement.

Hence the option A is right because it satisfies the above concept while the other is not because--

  • Option B states that it must be longer than one line which is not correct.
  • Option C states that it cannot be longer than one line but this line does not make any sense about the returned statement.
  • Option D states that it describes the parameter value which is the wrong definition about the returned statement.
6 0
3 years ago
Read 2 more answers
Serena, an analyst at an environmental agency, wants to prepare a report using data from the Car Emissions database.
konstantin123 [22]

Answer:

The correct answer is:

Option 1: export the query results from the database to a spreadsheet, then export the graph to a document.

Explanation:

Spreadsheets are used to represent numerical data, perform calculations and display the results numerically or graphically.

When using a database, the query results can be exported to other software using the query web address.

So in order to include the graph in her report, Serena will export the result to spreadsheet and then export the graph to document.

Hence,

The correct answer is:

Option 1: export the query results from the database to a spreadsheet, then export the graph to a document.

5 0
3 years ago
Read 2 more answers
If an element is nested within another element, what happens to each line of the nested element?
Elden [556K]

Nested elements are elements that are placed within another element.

When an element is nested within another, all lines of the nested element will <em>inherit </em>the <em>properties </em>of the parent element.

Take for instance, the following HTML code

<em><p align = "center"> I am a <b>boy</b> </p></em>

In the above HTML code,

The bold element (i.e. <b>) is nested in the paragraph element (i.e. <p>)

The paragraph element is aligned center.

This means that, all elements in the paragraph element (including the <em>bold element</em>) will be centralized.

Hence, all lines of a nested element will <em>inherit </em>the properties of the parent element.

Read more about nested elements at:

brainly.com/question/22914599

7 0
3 years ago
The severity of a burn or shock is not dependent on
Mariulka [41]

Hi Brainiac


The severity of a burn or shock is not dependent on the location or the distance from source


I hope that's help:0

5 0
3 years ago
What will be the value of x after the following code is executed? int x = 10; do { x *= 20; } while (x &lt; 5); A. 10 B. 200 C.
dezoksy [38]

Answer:

Option B is the correct answer.

Explanation:

  • In the above code, the loop will execute only one time because the loop condition is false and it is the Do-While loop and the property of the Do-while loop is to execute on a single time if the loop condition is false.
  • Then the statement "x*=20;" will execute one and gives the result 200 for x variable because this statement means "x=x*20".
  • SO the 200 is the answer for the X variable which is described above and it is stated from option B. Hence it is the correct option while the other is not because--
  1. Option A states that the value is 10 but the value is 200.
  2. Option C states that this is an infinite loop but the loop is executed one time.
  3. Option D states that the loop will not be executed but the loop is executed one time
6 0
3 years ago
Read 2 more answers
Other questions:
  • What are three things to consider in programming design?
    14·1 answer
  • Clifford visits a website that has a lot of multimedia content. He watches a few videos. However, some videos do not play. The b
    14·1 answer
  • I am doing Microsoft Excel and I have do formulas, Can some please explain to me how do them?
    14·1 answer
  • At what point in a vulnerability assessment would an attack tree be utilized?
    9·1 answer
  • customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft Pow
    5·1 answer
  • In 2019, the tuition for a full time student is $7,180 per semester. The tuition will be going up for the next 7 years at a rate
    14·1 answer
  • Networks, partnerships, and joint ventures are an example of
    7·1 answer
  • Compute series multiplier resistors RM = 100Ω:
    8·1 answer
  • Mingji is working to transfer photos from her digital camera to her computer. While
    11·1 answer
  • Ví dụ sau sẽ in ra dữ liệu của x là kiểu gì ?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!