Greetings,
Can anyone help me? I am to show the values of all the array elements. And make sure the output is a string of numbers with no spaces. I believe my code is correct but need help understanding if I am missing ALL oif the array elements
cjCode:#include <iostream> //cin, cout, <<, >>. #include <string> // use for string variables. using namespace std; const int LITTLE = 6, //Word LITTLE eqauls 6. MEDIUM = 10, //Word MEDIUM eqauls 10. BIG = 128; //Word BIG eqauls 128. int i, j, n = 9, //integers and n inilized to number 9. temp, number[MEDIUM] = { 99, 33, 44, 88, 22, 11, 55, 66, 77}; //an array. char ch, //characters. letterCount[BIG]; //an array. typedef double LittleDouble[LITTLE]; //redefines array LITTLE to LittleDouble. LittleDouble value; int main() { for (i = 1; i < LITTLE; i += 2) //a loop, i = 1, i < 6, increase i by 2. { value[i - 1] = double(i) / 2.0; value[i] = 10.0 * value[i - 1]; cout << "this is array value["<< i <<"] = "<< value[i] << '\n'; } return 0; }



LinkBack URL
About LinkBacks


