-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
62 lines (50 loc) · 1.57 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <iostream>
#include "LongNumber.h"
#include "RsaModule.h"
using namespace std;
int main()
{
LongNumber TestNum1 = *new LongNumber("98765");
LongNumber TestNum2 = *new LongNumber("65432");
LongNumber TestNum3 = *new LongNumber("54321");
LongNumber ResultNum;
cout << "TestNum1: " + TestNum1.getString();
cout << "TestNum2: " + TestNum1.getString();
cout << "TestNum3: " + TestNum1.getString();
cout << endl;
ResultNum = TestNum1 + TestNum2;
cout << "operator '+' result (TestNum1 + TestNum2) is: " + ResultNum.getString();
cout << endl;
ResultNum = TestNum1 - TestNum2;
cout << "operator '-' result (TestNum1 - TestNum2) is: " + ResultNum.getString();
cout << endl;
ResultNum = TestNum1 * TestNum2;
cout << "operator '*' result (TestNum1 * TestNum2) is: " + ResultNum.getString();
cout << endl;
ResultNum = TestNum1 / TestNum2;
cout << "operator '/' result (TestNum1 / TestNum2) is: " + ResultNum.getString();
cout << endl;
cout << "ResultNum = 0";
cout << endl;
ResultNum = *new LongNumber("0");
ResultNum += TestNum1;
cout << "operator '+=' result (ResultNum += TestNum1) is: " + ResultNum.getString();
cout << endl;
cout << endl;
cout << "ResultNum = 98766";
cout << endl;
ResultNum = *new LongNumber("98766");
ResultNum -= TestNum1;
cout << "operator '-=' result (ResultNum -= TestNum1) is: " + ResultNum.getString();
cout << endl;
cout << endl;
while (true)
{
RsaModule rsaModule;
rsaModule.testRsa();
cout << "Loop Done...";
cout << endl;
cout << endl;
}
return 0;
}