Computer Science Canada array |
Author: | nastynika [ Tue Feb 12, 2008 9:57 am ] |
Post subject: | array |
started a gr 12 comp ssci class but cant remember how to do most of it can u help me with my code please var marks : array 1 .. 10 of int var maximum : int := 0 for i : 1 .. 10 get marks (i) cls maximum := marks (i) put marks (i) .. end for put "Maximum = ", Maximum |
Author: | Zampano [ Tue Feb 12, 2008 11:23 am ] |
Post subject: | Re: array |
I guess you want to print the entire array. You don't need the ellipsis points. Of course, if you want to make the aximum the actual highest number, you should check first if it is with an if statement. |
Author: | nastynika [ Wed Feb 13, 2008 9:02 am ] |
Post subject: | Re: array |
so how do i do that i am trying to have ten marks placed on one line after they are entered then have the maximum mark appear underneath |
Author: | Tony [ Wed Feb 13, 2008 9:10 am ] | ||
Post subject: | RE:array | ||
|
Author: | nastynika [ Wed Feb 13, 2008 9:15 am ] |
Post subject: | Re: array |
thank you so much Tony |
Author: | Bored [ Wed Feb 13, 2008 3:34 pm ] | ||
Post subject: | Re: array | ||
Well if you need to find a maximum you can also use the max command
|
Author: | nastynika [ Thu Feb 14, 2008 9:03 am ] |
Post subject: | Re: array |
thanx for the help |