Computer Science Canada Student mark's program - need help |
| Author: | worschtl [ Thu Mar 22, 2007 1:16 pm ] | ||
| Post subject: | Student mark's program - need help | ||
Hello! For Grade 11 Computerengineering I have to complete the attached assignment. I' ve been desperately trying to do so, but still couldn't figure it out myself. The reason why is probably that I didn't take Grade 10. Still, my teacher is not willing to help me This is what I' ve got so far:
Now I don't know how to move on to the next mark in the 3rd loop, when a valid mark was entered. In addition, I think I'm missing arrays and i dont really know how to use them, even though having worked through the tutorial on this site. Hope you guys can help me, the assignment is already overdue... Thank you very much in advance, regards worschtl |
|||
| Author: | Tony [ Thu Mar 22, 2007 2:31 pm ] |
| Post subject: | RE:Student mark\'s program - need help |
The forum policy is to not directly answer homework questions, though we will help you learn concepts and ideas needed to solve your assignments. Uploading your entire assignment is a bad idea, your best bet is to ask specific questions, such as about troubles you're having with arrays. (Best to specify what, otherwise you'll just get directed to the tutorials again) |
|
| Author: | worschtl [ Thu Mar 22, 2007 3:51 pm ] |
| Post subject: | Re: Student mark's program - need help |
Alright, so how would I use an array in the program above, to save the student numbers 1-50 and the marks 1-6t for each of them in an array? Thanks, worschtl |
|
| Author: | Clayton [ Thu Mar 22, 2007 3:57 pm ] | ||
| Post subject: | Re: Student mark's program - need help | ||
The easiest way would be to use a custom type. Check out the records and types tutorial in the Turing Walkthrough for more info, but some sample code:
|
|||
| Author: | worschtl [ Thu Mar 22, 2007 4:09 pm ] |
| Post subject: | Re: Student mark's program - need help |
Thanks for your answer, I'll try to apply that to my program now. But I've got another problem: How can I get the 3rd loop to run just as many times as the user entered that there are marks to be entered? |
|
| Author: | Tony [ Thu Mar 22, 2007 6:58 pm ] |
| Post subject: | RE:Student mark\'s program - need help |
You would want to have a for loop that would run up to its limit, and then stop. |
|