Write a program to calculate the power consumed by a heater. This program also calculates the resistance value for the heater. The program’s design should use main that calls the three functions described below:
a) getData : Read data from the keyboard. This function is to use reference parameters (pass-by-reference concept) to read the voltage and the current.
b) calculate: To calculate the power and resistance for each heater. This function passes power and resistance by reference via a reference parameter.
c) displayPowerResistance :To display the power and resistance for each heater.
akhlakeng
-5
Newbie Poster
Fbody
commented:
Stop mooching and read the rules.
-3
Clinton Portis
commented:
baby got back.
-2
Recommended Answers
Jump to PostWe aren't going to give you the code. You have to write it yourself. If you put forth a good-faith effort and have a problem with a particular part of your code, post a proper question; then you'll get something useful.
I'll give …
Jump to PostThen I suggest you pay attention in class. Your posted questions (this one, and your triangle one) are obviously school assignments. The funny thing about homework is that it usually requires you to use a skill you either just learned or should already know to accomplish a task.
…
All 6 Replies
Fbody
682
Posting Maven
Featured Poster
akhlakeng
-5
Newbie Poster
Fbody
682
Posting Maven
Featured Poster
akhlakeng
-5
Newbie Poster
Fbody
682
Posting Maven
Featured Poster
akhlakeng
-5
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.