Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using C++ language. Solve the Question. 1. The power consumed by a heater can be calculated by the equation p=vi where p=power (watts) v=voltage (volts)
Using C++ language. Solve the Question.
1. The power consumed by a heater can be calculated by the equation p=vi where p=power (watts) v=voltage (volts) i=current (amperes) Write a program to calculate the power consumed by various types of heaters. The input specifications are these: Read the voltage, v (first column), and the current, i (second column). from this file. 110 220 90 370 5.5 23.5 13.6 44.4 The output specifications are these: The output shall display the following data on the screen: The input values of v and i The power For example, after reading the first line of input data, you should display the following on the screen: Input voltage=110.0 volts, current = 5.5 amperes Power consumed by the heater = 605.0 watts Note: Student is advised to use function topic to develop the program. 2. Rewrite a program question 1 that reads the input of voltage and current heater. Use at least three functions: one for input, one for calculating and one for the output. Display the power valueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started