Question:
Computer Programming Homework 2 (Guaranteed 10 Points for working answer!)?
2010-11-18 07:36:51 UTC
Here is a question from my computer programming homework. I don't completely understand the question. We are using C++ Visual Express 2010 to do this, and if you copy and paste a working answer to the question (one that will run on my computer), then I will give you 10 points! Here is the question: "Write two functions to determine the power dissipated by 2 resistors in parallel (R = 1/(1/R1+1/R2)). The main function should query the user for the values of the resistances. The first function should calculate the equivalent resistance for user defined resistances. The second function should query the user for the value of the current and return the power dissipated (R*i2). The first function should be called from the main function. The second function should be called only by the first." Thanks.
Four answers:
2010-11-18 07:44:56 UTC
How about an explanation and you write the code?



Input 2 long values, R1 and R2.



Calculate Re, the equivalent (parallel) resistance, Re = 1/(1/R1+1/R2)



Call the second function, giving it Re. It inputs a float, I.



Calculate the power, P = I^2 * Re. Return the result.



They probably want that returned result displayed, so something like



cout<
2010-11-18 18:03:10 UTC
Hey dudes.



First person to come over and build me a Car gets 10 points.



The care must be fully street legal, and ready to run.



Oh, it also must have a nice sound system in it.



10 points is all I can offer, thanks.



(F*cking ridiculous.)
Neunerball
2010-11-18 15:53:06 UTC
How about $70,- an hour instead of 10 points?
justme
2010-11-18 15:42:22 UTC
sorry, but I dont work for points, I work for money.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...