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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education