This sounds like a homework question, but I'll bite.
Imagine that the array looks like this:
1 2 3
4 5 6
7 8 9
The three ways they want you to display the contents are going from left to right and top to bottom, top to bottom and left to right, and right to left and bottom to top. These can easily be achieved using two nested for loops. Try doing it yourself and post what you get here.
int main()
{
int arr[3][3]={{1,2,3},{4,5,6},{7,8,9}};
for(int i=0; i<9; i++)
for(int j=0; j<9; j++)
{
return 0;
}
Not sure what to do next and that code tag thing i dont understand how im suppose to do that, i think i did it by clicking the first option were it says Format but idk making sure if thats what you mean?
Think about the array like this. The element array[p][q] is where lines p and q intersect. How can you move p and q iteratively, to print what you want?