Apr 23, 2015 at 4:39pm
1 2
|
for (int i = 0; i<5; i++)
printf("arrayA[%d] = %d\n", i, arrayA[i]);
|
Line 2
And how can I replace this with a more simplified/less advanced form of code?
Last edited on Apr 23, 2015 at 4:40pm
Apr 23, 2015 at 4:48pm
Seems fairly straight forward to me if you're using C. A C++ equivalent would normally utilize the standard output and stream operators.
cout << "arrayA[" << i << "] = " << arrayA[i] << endl;
Last edited on Apr 23, 2015 at 4:50pm