Hello all, I need some slight assistance on understanding why and how my program is one answer short of the right one I need. I know that may not make much sense so I'll just show you what I am talking about.
I have a program that needs to calculate the amount of green crud that has grown over 88 days, Using the Fibonacci Sequence. I have to write these in WHILE, FOR, and DO-WHILE.
Green Crud Program (FOR)
Crud(lbs) Number of Days
10 0
20 5
30 10
50 15
80 20
130 25
210 30
340 35
550 40
890 45
1440 50
2330 55
3770 60
6100 65
9870 70
15970 75
25840 80
41810 85
To reiterate, I need understanding on why, in the FOR loop, the day=0 but why does the for start at 0 and the while doesn't? If it starts at 0 then 10 needs to be repeated for 0 and 5, then 20 for 10.
IN the for loop it updates within the parameters. line 15. and in the while loop its on line 20. I don't understand why I have the same information within each program, and yet I get different outputs.
@Aysulu31,
Please write out 1650 times: "Thou shalt not hijack another forum poster's thread ... with homework questions ... which you have made no attempt at".