Please write a c++ programming code that can work on codechum according to the instructions below. Meter Reader. We need to start saving money people! I've noticed that we've been spending more money on electricity than everything else combined. In order for us to keep track of our electricity usage, we need to calculate our monthly cost based on our meter readings.   Cost: 0 to 100 kWh - P150.00 101 to 500 - P150.00 + 0.5 for each kWh over 100 over 500 - P350.00 + 0.3 for each kWh above 500 Input 1. Rate of energy consumption in kWh Output The first line will contain a message prompt to input the rate of energy consumption in kWh. The second line contains the total cost on electricity usage (in pesos). Enter·the·rate·of·consumption·(kWh):·324 Total·cost·=·P262.00

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section8.2: Lookup Tables And The Iferror Function
Problem 7QC
icon
Related questions
Question

Please write a c++ programming code that can work on codechum according to the instructions below.

Meter Reader.

We need to start saving money people! I've noticed that we've been spending more money on electricity than everything else combined. In order for us to keep track of our electricity usage, we need to calculate our monthly cost based on our meter readings.

 

Cost:

0 to 100 kWh - P150.00

101 to 500 - P150.00 + 0.5 for each kWh over 100

over 500 - P350.00 + 0.3 for each kWh above 500

Input

1. Rate of energy consumption in kWh

Output

The first line will contain a message prompt to input the rate of energy consumption in kWh.
The second line contains the total cost on electricity usage (in pesos).

Enter·the·rate·of·consumption·(kWh):·324
Total·cost·=·P262.00

4
0 to 100 kWh - P150.00
101 to 500 - P150.00+ 0.5 for each kWh over
100
over 500 - P350.00+ 0.3 for each kWh
above 500
Input
1. Rate of energy consumption in kWh
Output
The first line will contain a message prompt to
input the rate of energy consumption in kWh.
The second line contains the total cost on
electricity usage (in pesos).
Enter the rate of consumption (kWh): 324
Total cost = P262.00
Score: 0/15
Overview
< 5/6 >
main.cpp
1
C++
Tests
Executions
CE Run Tests
Test Cases
O Test Case 1
O Test Case 2
O Test Case 3
Test Case 4
O Test Case 5
Test Case 6
Hidden
Hidden
Execute Code [F10]
Submit Code
Transcribed Image Text:4 0 to 100 kWh - P150.00 101 to 500 - P150.00+ 0.5 for each kWh over 100 over 500 - P350.00+ 0.3 for each kWh above 500 Input 1. Rate of energy consumption in kWh Output The first line will contain a message prompt to input the rate of energy consumption in kWh. The second line contains the total cost on electricity usage (in pesos). Enter the rate of consumption (kWh): 324 Total cost = P262.00 Score: 0/15 Overview < 5/6 > main.cpp 1 C++ Tests Executions CE Run Tests Test Cases O Test Case 1 O Test Case 2 O Test Case 3 Test Case 4 O Test Case 5 Test Case 6 Hidden Hidden Execute Code [F10] Submit Code
5. Meter Reader
by CodeChum Admin
We need to start saving money people! I've
noticed that we've been spending more
money on electricity than everything else
combined. In order for us to keep track of our
electricity usage, we need to calculate our
monthly cost based on our meter readings.
Cost:
0 to 100 kWh - P150.00
101 to 500 - P150.00+ 0.5 for each kWh over
100
over 500 P350.00+ 0.3 for each kWh
above 500
Input
1. Rate of energy consumption in kWh
Score: 0/15
main.cpp
1
> +
C++
Tests
Executions
CE Run Tests
Test Cases
O Test Case 1
O Test Case 2
O
Test Case 3
O Test Case 4
O Test Case 5 Hidden
O Test Case 6
Hidden
Transcribed Image Text:5. Meter Reader by CodeChum Admin We need to start saving money people! I've noticed that we've been spending more money on electricity than everything else combined. In order for us to keep track of our electricity usage, we need to calculate our monthly cost based on our meter readings. Cost: 0 to 100 kWh - P150.00 101 to 500 - P150.00+ 0.5 for each kWh over 100 over 500 P350.00+ 0.3 for each kWh above 500 Input 1. Rate of energy consumption in kWh Score: 0/15 main.cpp 1 > + C++ Tests Executions CE Run Tests Test Cases O Test Case 1 O Test Case 2 O Test Case 3 O Test Case 4 O Test Case 5 Hidden O Test Case 6 Hidden
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage