Question: Q2: If a light fitting bulb outside your front door consumes 60 watts of power. Given that the (Energy= Power * Time), you are to

Q2: If a light fitting bulb outside your front door consumes 60 watts of power. Given that the (Energy= Power * Time), you are to write a C++ program that let the end-user to input the number of hours the light bulb was kept switched on and calculates the associated amount of energy consumed. Then, the program should covert the total energy consumed to kilowatt-hours given that each (1kW = 1000watt) and print the result on the screen. Sample input / output: Enter the number of hours the light is kept switched on: 12 The amount of energy consumed in Watt hours is 720Wh The amount of energy consumed in kilowatt hour is 0.72kWh
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
