Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

I am working on ps2a and can't figure out how to make a loop to generate all the possible 6a+9b+10c combinations.

OpenStudy (anonymous):

Do you have anything coded at all? Post it (using codepad, ideone or the like), no matter how ugly. It's easier to look at your specific problem rather than to speak generally. If you're stuck, start small. Write a code for one combination that you know will work. Build from there.

OpenStudy (anonymous):

Hi Bobby: Try to use the solve1 function from lecture 4 (at minute 28) as a model. The two problems are very similar.

OpenStudy (anonymous):

You will need 3 nested loops. One for each of a, b, and c.

OpenStudy (anonymous):

try doing this

OpenStudy (anonymous):

@Muavia, Yes, that is a solution to the problem. But he needs to learn how to write a program. That's why the other responses gave him hints and not just the answer.

OpenStudy (anonymous):

Thank you for all the help. I will work on this tonight. and hopefully post what i get.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!