Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<ctime>
- #include<string.h>
- #include<stdlib.h>
- #include<conio.h>
- #include<windows.h>
- #include<fstream>
- using namespace std;
- void Nation_list(void);
- void Korea(void);
- void search(char input[]);
- class Nation //'국가' 클래스화
- {
- public :
- char Name[10]; //국가 이름
- char Capital[10];//수도
- char Language[20];
- char President[20];//국가 원수 이름
- long Population; //인구
- char GDP[10]; //GDP
- };//메인함수의 인터페이스
- int main(void)
- {
- char input[10];
- Nation_list();
- cout<<"선택 : ";
- cin>>input;
- search(input);
- return 0;
- }
- void TimeZone(char *city, int plustime)
- {
- int timenow = time(0);
- int tmp = timenow / 86400;
- int s = timenow%60;
- int m = (timenow/60)-(timenow/3600*60);
- int h = ((timenow/3600)-(tmp*24))+plustime;
- //int bh = ((timenow+plustime)/3600)-(tmp*24);
- if(h>=24) h-=24;
- else if(h<0) h+=24
- cout<<"대한민국시간 : "<<h<<":"<<m<<":"<<s<<endl;
- Sleep(1000);
- }
- void search(char input[])
- {
- if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else if(strcmp(input,"대한민국")==0) Korea();
- else Korea();
- }
- void Nation_list(void)
- {
- cout<<" ,:;;~, . "<<endl;
- cout<<" ~;;;::::~~~~~, - - "<<endl;
- cout<<" ;!;:~;~~~,-~~~~~~. -- --- ,;!!!;- ~;;;;;;;;;; .~!!!!;- ;;;;;;:-. "<<endl;
- cout<<" !!!:--,,..~~~ ,.: ---, .--- !!!. .!!! ~! .!!;. -!!; !! .:!!; "<<endl;
- cout<<" :--~--,,,..~---~ ,,, --- .--- .;! !!. ~! !!; !! -!!, "<<endl;
- cout<<" ;!~~--,,,-,,~~-~ .~:: --: -; !! !! ~! !! !! ,!! "<<endl;
- cout<<" ~:~:-!-;.;~~~~~~~ ~-:: !: ;; !! !! ~!;;;;;;;; .!! !! !! "<<endl;
- cout<<" !;~-;;;:-,--~~:~~~:,,: :!;: ;;! :!- -!; ~! !!. !! !!; "<<endl;
- cout<<" !~!!!;;;,--~::::::,, ;!!! !!! ;!; !!; ~! !!: :, !! .!!; "<<endl;
- cout<<" !!;!;!;;;:;;:;;;;~ ,!!: !!! ;!!!!!!!~ ~!!!!!!!!!! .!!!!!!!!; !!!!!!!!! "<<endl;
- cout<<" .!;;;!!;;;;;;;! ,! !! "<<endl;
- cout<<" ,!;;;!;!!, , ! "<<endl;
- cout<<"그리스 "<<" 네덜란드 "<<" 노르웨이"<<endl;
- cout<<"뉴질랜드 "<<" 대한민국 "<<" 덴마크"<<endl;
- cout<<"독일 "<<" 라트비아 "<<" 룩셈부르크"<<endl;
- cout<<"멕시코 "<<" 미국 "<<" 벨기에"<<endl;
- cout<<"스웨덴 "<<" 스위스 "<<" 스페인"<<endl;
- cout<<"슬로바키아"<<" 슬로베니아"<<" 아이슬란드"<<endl;
- cout<<"아일랜드 "<<" 에스토니아"<<" 영국"<<endl;
- cout<<"오스트리아"<<" 이스라엘 "<<" 이탈리아"<<endl;
- cout<<"일본 "<<" 체코 "<<" 칠레"<<endl;
- cout<<"캐나다 "<<" 터키 "<<" 포르투갈"<<endl;
- cout<<"폴란드 "<<" 프랑스 "<<" 필란드"<<endl;
- cout<<"헝가리 "<<" 호주 "<<endl;
- }
- void Korea(void)
- {
- Nation Korea = {"대한민국","서울","한국어","문재인",51753820,"1조4981억"}; //인터페이스를 참고하여 한국의 대한 데이터
- while(1)
- {
- system("cls");
- cout<<"나라이름 : "<<Korea.Name<<endl;//인터페이스를 통한 접근
- cout<<"수도이름 : "<<Korea.Capital<<endl;
- cout<<"공식언어 : "<<Korea.Language<<endl;
- cout<<"국가원수 : "<<Korea.President<<"대통령"<<endl;
- cout<<"인구수 : "<<Korea.Population<<"명"<<endl;
- cout<<"GDP : "<<Korea.GDP<<"$"<<endl;
- TimeZone(Korea.Name,9);
- Sleep(500);
- if(kbhit()==1) break;
- }
- /* 파일 입출력부분과 시계출력과 충돌하는 부분이 있어 연구하고 있었습니다.
- void Korea(void)
- {
- string file="korea.txt";
- ifstream open(file.data());
- if(open.is_open()){
- string line;
- while(getline(open,line)){
- cout<<line<<endl;
- }
- open.close();
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement