dogsafire,
I haven't got far. We just got this and didn't get much info. I am in a C++ programing class and the teacher just reads from power point. Last semester only two people passed, now I see why.
I have the highest score in the class and stll don't know what the heck I am doing till we are about 3 weeks past it.
This is our first assn in arrays, we are using Walter Savitch's 6th Edition. I am just trying to get started on this prob. I am having a hard time understanding how to translate the prob into:
const int MAX = 10;
void outputA (int a[], int size);
int main () {
int a[MAX];
int i;
int x;
for (i=0;i%26lt;MAX;i++)
a[i]=0;
cout %26lt;%26lt; "Input grades ending with -1 "; // Has to be an int for this situation like(-1)
cin %26gt;%26gt; x;
i = 0;
while (x%26gt;=0 %26amp;%26amp; i%26lt;MAX){
a[i] = x;
i++;
cout %26lt;%26lt; "next: ";
cin %26gt;%26gt; x;}
for (i=0;i%26lt;MAX;i++)
cout %26lt;%26lt; a[i] %26lt;%26lt; endl;return 0;
outputA(a,i);
}
void outputA (int a[], int size){
int i;
for (i=0;i%26lt;size;i++)
cout %26lt;%26lt; a[i] %26lt;%26lt; endl;
}
HELP!! Lost on ......C++ (dogsafire)?
wat the heck is that?
flowering plum
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment