C+ (NOT C++) Resistance Caculation

  • Context: Comp Sci 
  • Thread starter Thread starter vladittude0583
  • Start date Start date
  • Tags Tags
    Resistance
Click For Summary

Discussion Overview

The discussion revolves around a homework assignment requiring the calculation of total resistance in a circuit with "infinite" resistor values using a programming language referred to as C+. Participants seek guidance on how to implement this in code, particularly focusing on handling an infinite number of resistor values.

Discussion Character

  • Homework-related
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • One participant asks how to calculate the "infinite" portion of the code, indicating a need for a while loop and conditional statements.
  • Another participant expresses confusion about the C+ language, suggesting it may be a misunderstanding of C language.
  • A participant asserts that the C language may not be suitable for solving the problem and hints at the need for equations based on the circuit's topology.
  • A later reply provides context about the original poster's current coursework, indicating they are taking Physics w/Calculus 2 and a C programming course.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the appropriateness of the C language for the task, and there is uncertainty regarding the existence and specifics of the C+ programming language.

Contextual Notes

There are limitations in understanding the requirements for handling "infinite" resistor values programmatically, as well as potential dependencies on the definitions of circuit topology and programming capabilities.

vladittude0583
Messages
40
Reaction score
0
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.
 
Physics news on Phys.org
vladittude0583 said:
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.
I haven't heard the C+ language.
Did you mean C language?
 
Yes, it is the C language, however, it is not C++, but C+ instead.
 
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.
 
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.
 

Similar threads

Replies
6
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
11K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K