Circuit Reliability program

This is a discussion on Circuit Reliability program within the C Programming forums, part of the General Programming Boards category; I have this project about circuit reliability that I am quite confused about. Sorry for the poor picture, but I'm ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    34

    Circuit Reliability program

    I have this project about circuit reliability that I am quite confused about.

    Sorry for the poor picture, but I'm not the greatest of photoshop artists. Here is the circuit:

    http://img89.imageshack.us/img89/4968/reliabhv9.jpg

    Basically I have to write a program to calculate the expected reliability of the circuit, and I know I need to use structs.

    I know I am going to have to use a loop something lke:

    [code]
    if (a+d==2||b+d==2||c+d==2)
    s=s+1;
    t=t+1;
    else t=t+1;

    Success is getting through any one of the paths, either AD, BD, or CE.

    I know that AD is going to be 72% successful, BD is going to be 67.5% successful, and CD is going to be 63% successful. I calculated that the probability of one of either A or B succeeding is 95%, and that the probability of getting through A or B and then D is 85.5%. And then to get through either ABD or CE is 94.635% chance of success.

    I know I am going to have to set:
    ab parallel = the chance ab is successful, etc etc etc (I don't feel like typing all of them out)

    I also need to write a separate program to test the circuit reliability with random numbers as many times as the user requests.

    As you can see, I have though about the project and some of the coding that needs to be done, but I really can't figure out how to start writing it.

    TIA for any help.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    When the logic for a new program isn't really clear, then your first task is to make it clear, using just plain English.

    So in English, post up your step by step algorithm to solve this problem, without the computer. Once your steps have become small enough and explicit enough to make the algorithm clear, then you can begin breaking them down into different functions, if needed, based on what your needs are. Common functions are:

    Getting Input. - from user and/or file
    Processing Data - perhaps only the data the user has requested to be processed
    Showing Output - on the monitor, and/or file.

    Once you have the above in place, including the math you need to get the numbers right, then the writing of the program becomes *much* easier. Basically, you're just taking the English steps and converting them into C language steps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 10:17 PM
  3. Replies: 3
    Last Post: 06-13-2005, 07:28 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21