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