63 lines
898 B
C++
63 lines
898 B
C++
|
#include <stdio.h>
|
|||
|
#include <Windows.h>
|
|||
|
|
|||
|
void Task1() {
|
|||
|
printf("Task1() START\n");
|
|||
|
int n, m;
|
|||
|
|
|||
|
m = 1;
|
|||
|
do {
|
|||
|
n = 1;
|
|||
|
do {
|
|||
|
printf(" %d", m * 10 + n);
|
|||
|
n++;
|
|||
|
} while (n <= 4);
|
|||
|
|
|||
|
printf("\n");
|
|||
|
m++;
|
|||
|
} while (m <= 5);
|
|||
|
|
|||
|
printf("Task1() FINISH\n");
|
|||
|
}
|
|||
|
|
|||
|
void Task2() {
|
|||
|
printf("Task2() START\n");
|
|||
|
int n = 1, m = 1, i = 10;
|
|||
|
do {
|
|||
|
do {
|
|||
|
printf(" %2d", n * m);
|
|||
|
m += 1;
|
|||
|
} while (m <= i);
|
|||
|
|
|||
|
printf("\n");
|
|||
|
|
|||
|
m = 1;
|
|||
|
n += 1;
|
|||
|
} while (n <= 10);
|
|||
|
|
|||
|
printf("Task2() FINISH\n");
|
|||
|
}
|
|||
|
|
|||
|
void main() {
|
|||
|
SetConsoleCP(1251);
|
|||
|
SetConsoleOutputCP(1251);
|
|||
|
int n;
|
|||
|
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("11:(m * 10 + n)\n");
|
|||
|
printf("12:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
printf("\n");
|
|||
|
printf("0:<3A><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
scanf_s("%d", &n);
|
|||
|
switch (n) {
|
|||
|
case 11:
|
|||
|
Task1();
|
|||
|
break;
|
|||
|
case 12:
|
|||
|
Task2();
|
|||
|
break;
|
|||
|
}
|
|||
|
} while (n != 0);
|
|||
|
}
|