Westonci.ca offers fast, accurate answers to your questions. Join our community and get the insights you need now. Experience the convenience of finding accurate answers to your questions from knowledgeable professionals on our platform. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.
Sagot :
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;
}
}
We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.