initial commit

This commit is contained in:
2023-07-16 13:23:25 +00:00
commit c3fa5367c3
85 changed files with 4921 additions and 0 deletions

26
C++/lesson3/task4.cpp Normal file
View File

@ -0,0 +1,26 @@
#include <iostream>
int main() {
int n;
std::cin >> n;
int a[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = i * j;
std::cout << a[i][j] << " ";
}
std::cout << "\n";
}
int s = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
s += a[i][j];
}
int avg = s / n;
std::cout << avg << "\n";
s = 0;
}
}