65 lines
982 B
C
65 lines
982 B
C
|
#include <stdio.h>
|
|||
|
#include <Windows.h>
|
|||
|
|
|||
|
void Task1() {
|
|||
|
printf("Task1() START\n");
|
|||
|
int n, m, a;
|
|||
|
printf("n = ");
|
|||
|
scanf_s("%d", &n);
|
|||
|
printf("m = ");
|
|||
|
scanf_s("%d", &m);
|
|||
|
|
|||
|
int i = 1;
|
|||
|
do {
|
|||
|
int j = 1;
|
|||
|
do {
|
|||
|
a = i * 10 + j;
|
|||
|
printf("%d ", a);
|
|||
|
j += 1;
|
|||
|
} while (j <= m);
|
|||
|
printf("\n");
|
|||
|
i += 1;
|
|||
|
} while (i <= n);
|
|||
|
printf("Task1() FINISH");
|
|||
|
};
|
|||
|
|
|||
|
void Task2() {
|
|||
|
printf("Task1() START\n");
|
|||
|
int y[11][11];
|
|||
|
int j;
|
|||
|
int i;
|
|||
|
|
|||
|
for (i=1; i <= 10; i++) {
|
|||
|
for (j=1; j <= 10; j++) {
|
|||
|
y[i][j] = i * j;
|
|||
|
printf("%6d", y[i][j]);
|
|||
|
} printf("\n");
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
void main() {
|
|||
|
|
|||
|
SetConsoleCP(1251);
|
|||
|
SetConsoleOutputCP(1251);
|
|||
|
|
|||
|
int a;
|
|||
|
do {
|
|||
|
printf("\n");
|
|||
|
printf("\n");
|
|||
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
|
|||
|
printf("1: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 (i * 10 + j)\n");
|
|||
|
printf("2: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)\n");
|
|||
|
printf("\n");
|
|||
|
printf("0: <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
scanf_s("%d", &a);
|
|||
|
switch (a) {
|
|||
|
case 1:
|
|||
|
Task1();
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
Task2();
|
|||
|
break;
|
|||
|
}
|
|||
|
} while (a != 0);
|
|||
|
};
|