-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dop.cpp
49 lines (38 loc) · 982 Bytes
/
Dop.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include <Windows.h>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main()
{
system("chcp 1251 >nul");
int n;
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
while(true)
{
int sprob = 3, num, n, i = 1;
cout << "Ââåä³òü ÷èñëî íà ÿêå âè õî÷åòå ïåðåâ³ðèòè òàáëèöþ ìíîæåííÿ " << endl;
cin >> n;
cout << "_________________________________________________" << endl;
do
{
cout << i << " * " << n << " = ";
cin >> num;
if (num % (n * i) != 0)
{
sprob--;
cout << "___________________________" << endl;
cout << "Çàëèøèëîñÿ " << sprob << " ñïðîá" << endl;
cout << "___________________________" << endl;
}
i++;
} while (sprob != 0);
cout << "You LoSer" << endl;
cout << "___________________________" << endl;
cout << "n/N - exit" << endl;
n = _getch();
if (n == 78 || n == 110 || n == 210 || n == 242) exit(0);
system("cls");
}
}