aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index c7715dc..c846482 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -44,14 +44,23 @@ int printArray(int(&matrix)[ROW][COLUMN]) {
{
for (auto j = 0u; j < COLUMN; ++j)
{
- for (auto t = 1; t <= 9; ++t)
- {
- matrix[i][j] = t;
- cout << matrix[i][j] << " ";
- }
-
+ //if (i <= 9, j <= 9)
+ //{
+ // int t = 0;
+ // t + 1;
+ // matrix[i][j] = t;
+ // cout << matrix[i][j] << " ";
+ //}
+ //int t = 1;
+ //++t;
+ //matrix[i][j] = t;
+ //cout << matrix[i][j] << " ";
+ matrix[i][j] = i * COLUMN + j + 1;
+ cout << matrix[i][j] << " ";
}
+ cout << endl;
}
+
return 0;
}
int main()