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.

Comments
baby got back.
Stop mooching and read the rules.

You write it first.

We 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 you this though:

//header #includes
//...

//function prototypes
//...

//constant definitions
//...

int main() {
  //...
  return 0;
}

//function implementations
//...

Edited 5 Years Ago by Fbody: n/a

Then 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.

Get your book out and read it, pay attention in class, and do your own work; otherwise, you'll never learn it.

If you really are that lost, here's some reading material.

Edited 5 Years Ago by Fbody: n/a

okay..thanks for your help! i already know how to do it :D

If you already know how to do it, why are you wasting our time? I don't think anyone besides you will consider that funny. :(

Edited 5 Years Ago by Fbody: n/a

This article has been dead for over six months. Start a new discussion instead.