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.

Fbody commented: Stop mooching and read the rules. -3
Clinton Portis commented: baby got back. -2

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

don't know howto do it..if i know, i wouldn't ask bout it..

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.

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

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. :(

after you give me that link, i read it..and now i know how to do it.

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.