2024-11-06 13:44:07 +04:00

54 lines
734 B
C++

#include <stdio.h>
#include <Windows.h>
void Task2() {
printf("Task2() START\n");
int i = 1;
do {
int j = 1;
do {
printf("%d ", j * i);
j++;
} while (j <= 10);
printf("\n");
i++;
} while (i <= 10);
printf("Task2() FINISH\n");
}
void main() {
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
int n = -1;
do {
printf("\n");
printf("\n");
printf("Âûáåðèòå íóæíóþ âàì îïåðàöèþ:\n");
printf("1: Çàäà÷à 1 (i * 10 + j) \n");
printf("2: Çàäà÷à 2 (Òàáëèöà Ïèôàãîðà)\n");
printf("3: Çàäà÷à 3 (Ðèñóíîê ïî âàðèàíòó)\n");
printf("\n");
printf("0: Âûéòè èç ïðîãðàììû\n");
scanf_s("%d", &n);
switch (n) {
case 1:
Task1();
break;
case 2:
Task2();
break;
}
} while (n != 0);
}