-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
66 lines (60 loc) · 1.73 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
63
64
65
66
//프로그램
#include "data.h"
#include <iostream>
#include <string>
#include <ctime>
using namespace std;
string word(Dataset& data);
string sentence(Dataset& data);
string essay(Dataset& data);
void write(string record);
void read();
int main() {
Dataset ds;
std::cout << "*******************************************" << endl;
std::cout << " --------- \\ \\ / /-------- | _____|" << endl;
std::cout << " ----| |--- \\ \\ / / | |---| || |" << endl;
std::cout << " | | \\ \\/ / | |---| || |_____" << endl;
std::cout << " | | | | | _____|| _____|" << endl;
std::cout << " | | | | | | | |_____ " << endl;
std::cout << " | | | | | | |_______|" << endl;
std::cout << endl << endl;
while (true) {
std::cout << "************* 한글 타자연습 홈 *************" << endl;
std::cout<< " ---------- selection -----------" << endl;
std::cout << " | 1.데이터 편집하러 가기 |" << endl;
std::cout << " | 2.낱말 연습 |" << endl;
std::cout << " | 3.짧은글 연습 |" << endl;
std::cout << " | 4.긴글 연습 |" << endl;
std::cout << " | 5.성적 기록 보기 |" << endl;
std::cout << " | 6.타자연습 그만할래요 |" << endl;
std::cout << " --------------------------------" << endl;
std::cout << " I want to go to : ";
int user;
cin >> user;
std::cout << endl;
switch (user) {
case(1):
ds.edit();
break;
case(2):
write(word(ds));
break;
case(3):
write(sentence(ds));
break;
case(4):
write(essay(ds));
break;
case(5):
read();
break;
case(6):
std::cout << "타자 프로그램을 종료합니다. \n" << endl;
return 0;
default:
break;
}
}
return 0;
}