1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C+ (NOT C++) Resistance Caculation

  1. Oct 2, 2008 #1
    Our homework requires us to write a program that will calculate the total resistance of a circuit with "infinite" resistor values.

    My question is, how would I calculate the "infinite" portion of the code? I already know that this will require a while loop with some if/for statements. I am just unsure of how to write the code that take will care of the "infinite" number of values of resistors.

    If you could give me an idea as to how to do so it would be greatly appreciated - on a side note, I am in C+ programming and not C++ programming, so please provide me with an answer in terms of the language I am familiar too and not one above it. Thanks.
  2. jcsd
  3. Oct 2, 2008 #2


    User Avatar

    I haven't heard the C+ language.
    Did you mean C language?
  4. Oct 2, 2008 #3
    Yes, it is the C language, however, it is not C++, but C+ instead.
  5. Oct 2, 2008 #4


    User Avatar

    I think the C language can't solve your problem.
    ( I suspect that you have some courses on "Electrical ciuruit" instead of having a programing language course).

    I guess your problem can be solved by some equations by the "topology structure of the circuit" If you supply more details.
  6. Oct 2, 2008 #5
    Well, I am currently taking Physics w/Calculus 2 and COP2220 (C programming) which is required before I transfer over to the university next year in their physics program. Therefore, I have not had any specialized courses taken yet in terms of upper-level.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: C+ (NOT C++) Resistance Caculation
  1. Rolling resistance (Replies: 4)

  2. Resistance question (Replies: 2)

  3. Resistivity question. (Replies: 1)

  4. Thevenin Resistence (Replies: 3)