Created
August 14, 2013 13:41
-
-
Save ahoulgrave/6231181 to your computer and use it in GitHub Desktop.
arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
int B[5][5] = { | |
{1,2,3,7,5}, | |
{4,5,6,8,4}, | |
{7,8,9,6,4}, | |
{7,8,9,6,4}, | |
{7,8,9,6,4} | |
}; | |
int r = 4; | |
for (int i = 0; i < 5; i++) { | |
for (int j = 0; j < 5; j++) { | |
if (j == r) { | |
printf("%d ",B[i][j]); | |
r = r - 1; | |
} else { | |
printf("@ "); | |
} | |
} | |
printf("\n\n"); | |
} | |
system("PAUSE"); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment