|
I know it is not right to post homework, but I wasn't asking for anyone to do the work, i was looking for something to point out something that I have been overlooking for the last 10 hours. Your right this program does not calculate the fibonacci numbers but it was a test program for the function that the teacher had given us in class to create the pipelines but when i ran the code i got the problem that i had posted, and was looking for a answer to the one problem I was having. Also his office hours were canceled today, he is usually around but today he wasn't. The only thing i was asking was how come the processes weren't executing properly with the code that the teacher had given us. I was just wondering if it was correct or if it was wrong because the Parent process never breaks out of the loop.
Like i had said I finished all the rest of the program, I am using c-strings (char *a, and char *b) to store the numbers in, to add them I have 3 variables, numa, numb, and carry. I reverse the 2 c-strings containing the numbers i want to add and reverse them, take the first numbers, add them, if there is a carry then it will be added to the next 2 numbers in the c-string. Then once that is done the c-string c contains the result and is sent with c-string b to the next process to calculate the next number in the sequence.
Thank you for your help
-tn
Last edited by Trivialnight : 02-22-2005 at 08:13 PM.
|