Выгрузка всех файлов

This commit is contained in:
2025-05-03 11:48:32 +03:00
parent 22475e1eb5
commit 7853f66d43
12 changed files with 443 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
fun main() {
val matrix: Array<Array<Int>> = Array(10) { Array<Int>(10) { 0 } }
//matrix[0][0] = 1
// Fill from left-top to right-top
for (i in 0..9) {
matrix[i][0] = i
}
// Fill from left-top to left-bottom
for (i in 0..9) {
matrix[0][i] = i
}
// Fill all other
for (x in 1..9) {
for (y in 1..9) {
matrix[x][y] = x * y
}
}
// Get output
for (x in 0..9) {
for (y in 0..9) {
if (matrix[x][y] >= 10) {
print("${matrix[x][y]} ")
}
else {
print("${matrix[x][y]} ")
}
}
println()
}
}