Skip to content

a call for C++ programers

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #191189
    s-eye
    Member

    hello everyone.. i need help from any C++ coder… i tired but i got a lot of errors in th eprogram .. can someone please help me out with this program

    Create an ASCII Art representation of a simple parallel or series circuit using cout and proper formatting statements, similar to the circuit shown below, with the following components:

    ============================================================
    Part II
    Write a program that uses Ohms law (V = I * R, where V is the voltage in volts, I is the current in amps, and R is the resistance in Ohms) to solve a basic 3-resistors parallel or series circuit problem with a fixed DC voltage source rated at 12 VDC.

    First, your program should display a brief description of its operation and then ask the user to choose either a single source 3-resistors series circuit or a parallel circuit with the same specs.

    Next, program prompts the user for the resistance values R1, R2, R3 and then computes and displays the voltage values across these resistors, the currents through each, and the total current supplied by the voltage source. Finally, program will calculate the total power supplied by the voltage source using the P = V * I, and the equivalent resistance as seen by the voltage source. You should use cout and cin for the output and input, respectively. Display the results in floating point format with a field width of 10 characters, three decimal point digits, and right-justified.

    Use a while and switch structure to analyze each circuit based on that circuit’s component values. Within the switch, prompt the user to enter the appropriate data your program needs to calculate the voltages, currents, and total power based on that circuit resistor values.

    Sample Output:

    Select from the following circuit types:
    1) Three-resistors Parallel Circuit
    2) Three-resistors Series Circuit
    3) Quit Program

    Enter Your Choice: 1
    Three-resistors Parallel Circuit Selected

    Enter value for R1 in Ohms: 4700
    Enter value for R1 in Ohms: 6800
    Enter value for R1 in Ohms: 8200


    Voltage across R1 = 12 VDC
    Voltage across R2 = 12 VDC
    Voltage across R3 = 12 VDC

    Current through R1 = 2.553 mA
    Current through R2 = 1.765 mA
    Current through R1 = 1.463 mA

    Total power = 69.372 mW
    Equivalent Resistance = 2075.765 Ω


    Would you like to do another circuit analysis? (Y/N):

    thanks so much

    #191195
    s-eye
    Member

    please please i need someone help..

    #191194
    autopilot
    Member

    why don’t you upload your project source code and then people can look at it to see if they can help you.

    #191193
    Chike
    Member

    LOL you want us to do your homework dude? That’s like cheating.
    What format statments? I missed that class LOL.

    #191192
    s-eye
    Member

    hello

    i tired to make it but it gives me a lot of errors ….

    i want my program to work an infinite number of times, meaning that someone can go through it over and over again. So for that you need a while loop, so this is how the logic of your program should work, while the user wants to run the program, allow them to choose one of three options, if option 1 do series circuit, if option 2 do parallel circuit, if option 3 quit the program. Then switch, case 1 do series circuit, case 2 do parallel circuit, case 3 quit program. and finally if the user chooses three, then you want the while loop to be come false.. this is the idea of the program but still so far i got many errors …. it is a project and i ask someone to hel because i found hard to me .. its a help dude

    thanks

    #191191
    Chike
    Member

    Ok, you just forgot one thing…. the source files LOL.
    When you edit the post you click the “Upload attachement” below it, and add your source files, then send the post along with other info ou can give, like what kind off errors you get.
    The more information you give, the more likely ppl will be able to assist you.

    #191190
    Dody
    Member

    I don’t know if you solved your problem or not
    but if you are using the 8051 siemens, then I can give you my full project
    I almost done something similar some time ago (as good as I can remember 🙂 )

    though my code is a plain C with some special headers of the uVision platform

    best wishes..

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.