2024-10-31 02:13:19 +04:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
|
void Task1() {
|
|
|
|
|
printf("Task1() START\n");
|
|
|
|
|
int n, m, z = 1, x = 1;
|
|
|
|
|
scanf_s("%d", &n);
|
|
|
|
|
scanf_s("%d", &m);
|
|
|
|
|
do {
|
|
|
|
|
printf("%d ", z*10+x);
|
|
|
|
|
if (x == m) {
|
|
|
|
|
x = 1;
|
|
|
|
|
printf("\n");
|
|
|
|
|
z += 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
x += 1;
|
|
|
|
|
}
|
|
|
|
|
} while ((x <= m) && (z <= n));
|
|
|
|
|
printf("Task1() FINISH\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Task2() {
|
|
|
|
|
printf("Task2() START\n");
|
|
|
|
|
int m = 1, n = 10, b = 1;
|
|
|
|
|
do {
|
|
|
|
|
printf("%3d ", m);
|
|
|
|
|
if (m != n) {
|
|
|
|
|
m += b;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
printf("\n");
|
|
|
|
|
b += 1;
|
|
|
|
|
m = b;
|
|
|
|
|
n += 10;
|
|
|
|
|
}
|
|
|
|
|
} while ((m <= 100) && (m != 11));
|
|
|
|
|
printf("Task2() FINISH\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Task3() {
|
|
|
|
|
printf("Task3() START\n");
|
|
|
|
|
printf("Task3() FINISH\n");
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-31 02:25:28 +04:00
|
|
|
|
void main()
|
|
|
|
|
{
|
|
|
|
|
int odin, dwa, max, min;
|
|
|
|
|
|
|
|
|
|
SetConsoleCP(1251);
|
|
|
|
|
SetConsoleOutputCP(1251);
|
|
|
|
|
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> - ");
|
|
|
|
|
scanf_s("%d", &odin);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> - ");
|
|
|
|
|
scanf_s("%d", &dwa);
|
|
|
|
|
|
|
|
|
|
if (odin > dwa) {
|
|
|
|
|
min = dwa;
|
|
|
|
|
max = odin;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
min = odin;
|
|
|
|
|
max = dwa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> - %d\n", max);
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> - %d", min);
|
|
|
|
|
}
|