|
-
April 18th, 2009, 03:49 PM
#1
arrays
Hey, I am kinda having problems with the following...
The first array will have between 4 to 8 members of integer
data type and will be the IQs (Intelligent Quotient - usually
values between 80 and 150) for those people.
I can't find a shorter way to do this. I mean usually you do it like int ages[5] = {49,48,26,19,16}; etc. but there has to be something for a wide range of numbers like here. And I have no idea how to include the 4 to 8 members in this
Maybe this format?
Code:
ages[0] = 49;
ages[1] = 48;
ages[2] = 26;
ages[3] = 19;
ages[4] = 16;
But then I don't quite know how to assign the IQ value to them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|