1. 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. 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.