1)
#include <iostream>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a[10][10];
int cur = 1;
for(int i = 0; i < 10; i++)
for(int j = 0; j < 10; j++){
a[i][j] = cur;
cur++;
}
for(int i = 0; i < 10; i++){
for(int j = 0; j < 10; j++)
cout << a[i][j] << " ";
cout << "\n";
2)
int a[5][5];
int cur = 3;
for(int i = 0; i < 5; i++)
for(int j = 0; j < 5; j++){
cur+=3;
for(int i = 0; i < 5; i++){
for(int j = 0; j < 5; j++)
3)
int a[11][11];
for(int i = 1; i <= 9; i++)
for(int j = 1; j <= 9; j++)
a[i][j] = i*j;
for(int i = 1; i <= 9; i++){
(25)
a = 2
b = 3
for i in range(5, 10):
a = a + 3 + a
b = b + a - b
print(a + b)
---314---
(20)
for x in range(1, 6): print('#', end= '')------
for x in range(6): print('#', end= '')------
for x in range(2, 8): print('#', end= '')------
for x in range(5, 6): print('#', end= '')---#---
for x in range(6, 6): print('#', end= '')--- ---
for x in range(5, 0, 1): print('#', end= '')--- ---
for x in range(5, 4, -1): print('#', end= '')---#---
for x in range(5, 1, -1): print('#', end= '')------
for x in range(1, 4, -1): print('#', end= '')--- ---
1)
#include <iostream>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a[10][10];
int cur = 1;
for(int i = 0; i < 10; i++)
for(int j = 0; j < 10; j++){
a[i][j] = cur;
cur++;
}
for(int i = 0; i < 10; i++){
for(int j = 0; j < 10; j++)
cout << a[i][j] << " ";
cout << "\n";
}
}
2)
#include <iostream>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a[5][5];
int cur = 3;
for(int i = 0; i < 5; i++)
for(int j = 0; j < 5; j++){
a[i][j] = cur;
cur+=3;
}
for(int i = 0; i < 5; i++){
for(int j = 0; j < 5; j++)
cout << a[i][j] << " ";
cout << "\n";
}
}
3)
#include <iostream>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a[11][11];
for(int i = 1; i <= 9; i++)
for(int j = 1; j <= 9; j++)
a[i][j] = i*j;
for(int i = 1; i <= 9; i++){
for(int j = 1; j <= 9; j++)
cout << a[i][j] << " ";
cout << "\n";
}
}
(25)
a = 2
b = 3
for i in range(5, 10):
a = a + 3 + a
b = b + a - b
print(a + b)
---314---
(20)
for x in range(1, 6): print('#', end= '')------
for x in range(6): print('#', end= '')------
for x in range(2, 8): print('#', end= '')------
for x in range(5, 6): print('#', end= '')---#---
for x in range(6, 6): print('#', end= '')--- ---
for x in range(5, 0, 1): print('#', end= '')--- ---
for x in range(5, 4, -1): print('#', end= '')---#---
for x in range(5, 1, -1): print('#', end= '')------
for x in range(1, 4, -1): print('#', end= '')--- ---