-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (39 loc) · 922 Bytes
/
main.cpp
File metadata and controls
51 lines (39 loc) · 922 Bytes
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 <string>
#include "t.h"
using namespace std;
int32_t changeFloat2Int(string sFloat, int32_t &base, int32_t &exp)
{
return 0;
}
int main(int argc, char** argv)
{
std::cout << "usage: base(int) exp(int)" << std::endl;
//change to int
int32_t g_ibase = 95123;
int32_t g_imov=1000;
int32_t g_iexp = 12;
if (argc == 1)
{
std::cout << "default : base =" << g_ibase << std::endl;
std::cout << "default : exp =" << g_iexp << std::endl;
}
else if (argc == 3)
{
std::cout << "default : base =" << argv[1] << std::endl;
std::cout << "default : exp =" << argv[2] << std::endl;
//changeFloat2Int(argv[1], g_ibase, g_imov);
g_ibase = atoi(argv[1]);
g_iexp = atoi(argv[2]);
}
else
{
std::cout << "error input" << std::endl;
exit(1);
}
tStr tBigNum(g_ibase, g_imov, g_iexp);
//tBigNum.print();
tBigNum.doMultiStrAndInt2Str();
tBigNum.print();
return 0;
}