By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

comparing numbers in an original array with numbers in the second array

P: 1
Hi All,

Say the original array has numbers 1 to 50. A user is to enter numbers in the next array. If the number in the original array matches the number in the next array, a point is awarded to the user, and the correct matches are written into the third array. At the end of the comparison the correct matches in the third array are counted and a score is given to the user. If 40 matches were correct then the user's score is 40/50 and a percentage of 80% is given.
Jun 15 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 4,677

Was there a question in there? It looks like you just copied and pasted your homework without asking anything about it.

It seems like you have a simple array comparison. I'd suggest looking into the 'for' loop. A decision you will need to make is if you should award points to a number that is anywhere in the array, or just points to a number that is in the same position in both arrays.

Did you have a question on the actual code or implementation?
Jun 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.