+ 1
Int x[2][3] = {{1,2,3},{4,5,6}}; I want to print all the numbers included in 2D array how?
Using C++
5 Antworten
+ 7
for (int first = 0; first < 2; first++) {
for (int second = 0; second < 3; second++)
cout << x[first][second] << " ";
cout << endl;
}
+ 2
It should already print that way, if you used my code.
+ 1
Thanks sir.
+ 1
Yes I know that now earlier I am not focus on endl and " " .
0
I want to display number like that
1 2 3
4 5 6
How can I do?