0

I need help with writing a code in c++ to calculate resistors in series-parallel?

24th Apr 2023, 4:51 AM
winston
8 Antworten
+ 3
No, you need help refining your question first. Be specific: what's your given input, and what's your desired output? eg are you calculating total effective resistance for a circuit, or voltage across / current through a given resistor, or ... ? Also, not everyone here has a science background, so you'll probably wanna provide all relevant physical formulas as well (presumably just Ohm's law, in this case)
24th Apr 2023, 6:34 AM
Orin Cook
Orin Cook - avatar
+ 2
Upload your attempt. You should read this: https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
24th Apr 2023, 7:17 AM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 1
winston I saw the topic you are given in your profile. However, it is not clear how the inputs are going to be obtained. How are the values inputted? How would you know which components are connected and how are they connected(series or parallel)? The conversion of formula to code is fairly straightforward, but what are the inputs and how are they obtained needs to be specified so you can set up your code properly. Also, how much C++ have you written? Do you have at least a rough code for us to see?
24th Apr 2023, 9:29 AM
Bob_Li
Bob_Li - avatar
+ 1
I assume we will have to ask the user for the inputs and how the components are connected so the code will have to decide base on the different scenarios a user may input.
24th Apr 2023, 3:32 PM
winston
+ 1
I will send the code that I have written shortly.
24th Apr 2023, 3:33 PM
winston
+ 1
Thank you.
25th Apr 2023, 10:03 AM
winston
0
winston off topic, but here are links to interesting sites where you can set up and analyze circuits graphically, to illustrate how a gui can make things a lot more interactive. https://www.falstad.com/circuit/circuitjs.html https://www.circuitlab.com/editor/#?id=7pq5wm&from=homepage
25th Apr 2023, 6:31 AM
Bob_Li
Bob_Li - avatar