|
-
April 18th, 2009, 05:44 PM
#10
Re: arrays
Forgive me if I'm being redundent, but you are suposed to have an array cabable of carring up to eight integers for IQ's and an array of six floats for the spare change. The program allows you to make changes to the IQ array's second element and display a sizeof() in a for loop to display both arrays size.
Therefore your question is how to asign your elements an IQ? (got this from the first post)
If so, you are correct, this will create and assign a number to the IQ array.
int arrayIQ [8]={0,0,0,0,0,0,0,0};
arrayIQ[2]=100;
of corse, you have to let the human enter the actuall nuber that it becomes correct? So
insead of 100 you would use a variable that user input would set.
int arrayIQ[8]={0,0,0,0,0,0,0,0};
int variableForIQ_subTwo=0;
cin>>variableForIQ_subTwo;
arrayIQ[2]=variableForIQ_subTwo;
If not this, I don't understand your question.
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
|