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]
2 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]2 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
If your computer determines the destination address of a network packet is to a remote network.
Arisa [49]

The data link layer software would replace the MAC address of the next hop or gateway when the destination address of a network packet is to a remote network.

<h3>What is a data link layer?</h3>

The data link layer is the second layer of the OSI model and it can be defined as an interface between the network and physical layer. Also, it comprises two (2) main sublayers and these include the following:

  • Logical link control (LLC) layer.
  • Media access control (MAC) layer.

In Computer networking, the data link layer software would replace the MAC address of the next hop or gateway when the destination address of a network packet is to a remote network.

Read more on data link layer here: brainly.com/question/13131540

#SPJ1

5 0
2 years ago
What is the location used by users to configure delegate access on their own mailboxes? Backstage view &gt; Account Settings Bac
abruzzese [7]

Answer:

A: Backstage view > Account Settings

Explanation:

7 0
3 years ago
Software that translates the sound of human voice into text is called:________.
S_A_V [24]

Answer:

C) speech recognition software.

Explanation:

Software that translates the sound of human voice into text is called a speech recognition software.

In Computer science, a speech recognition software is a voice technology application or program which enables the conversion of human voice such as spoken language to computer commands such as text through the use of speech recognition algorithms.

Some examples of speech recognition software are HTK, Kaldi, Voice navigator, Julius etc.

6 0
2 years ago
What are the two basic categories of film
kati45 [8]
Video and Sound are the 2 most basic categories of film
3 0
3 years ago
The Caesar Cipher has 25 different shifts to try.
statuscvo [17]

Answer:

D. 25x24x23x22x21.....3x2x1.

Explanation:

The ceasar cipher is a encryption technique, that uses a combination of information or keys to encrypt an information.

The 25 shift ceasar cipher has 25 different combinations, so the number of probable random cipher substitution is 25!,

That is = 25 × 24×23× 22×..... ×2×1.

3 0
2 years ago
Other questions:
  • Write the code that creates a public class named Vehicle that has one private data member. The private data member is an integer
    13·1 answer
  • How is the cia triad used to evaluate encryption methods?
    6·1 answer
  • Multiply 1101 and 0110 in binary.
    10·1 answer
  • Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimete
    7·1 answer
  • Quinton is having trouble learning Spanish because he keeps reverting back to the grammatical structures of his native English l
    6·1 answer
  • In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital
    8·1 answer
  • What are two reasons why tuples exist in Python?
    9·1 answer
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • A cpu handless all the instruction that it recieces from hard ware and software which are available on the computer true or fals
    7·1 answer
  • 1. Which one of the following is true about screening interviews?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!