Created
November 3, 2012 07:38
-
-
Save Jack2/4006452 to your computer and use it in GitHub Desktop.
[C++]hw4_CUI_calc_2012/11/03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Kkupdaeki | |
{ | |
public: | |
void DrawTriangle(); | |
}; | |
class Kyesan | |
{ | |
public: | |
int outnum; | |
void input(); | |
int calc(int num1, int num2, char buho){ | |
return outnum; | |
} | |
void output(); | |
}; | |
//입력값을 보여주는 창 | |
void Kyesan::input(){ | |
int innum; | |
cout << "\t\t\t\t\t"; | |
cin >> innum; | |
} | |
//계산결과값을 보여주는 창 | |
void Kyesan::output(){ | |
int outnum; | |
cout << "result\n"; | |
} | |
// 전체적인 계산기 모형을 그려주는 함수 | |
void Kkupdaeki::DrawTriangle(){ | |
Kyesan kyesan; | |
cout << "\n\n\t\t = Jack2 Calc = \n"; | |
cout << "\t -------------------------------------\n"; | |
for(int i=0; i<10; i++){ | |
cout << "\t| |\n"; | |
switch(i){ | |
case 2: | |
cout << "\t| --------------------------------- |\n"; | |
continue; | |
case 4: | |
cout << "\t| --- --- --- --- |\n"; | |
cout << "\t| | 7 | | 8 | | 9 | | + | |\n"; | |
cout << "\t| --- --- --- --- |\n"; | |
continue; | |
case 5: | |
cout << "\t| --- --- --- --- |\n"; | |
cout << "\t| | 4 | | 5 | | 6 | | - | |\n"; | |
cout << "\t| --- --- --- --- |\n"; | |
continue; | |
case 6: | |
cout << "\t| --- --- --- --- |\n"; | |
cout << "\t| | 1 | | 2 | | 3 | | * | |\n"; | |
cout << "\t| --- --- --- --- |\n"; | |
continue; | |
case 7: | |
cout << "\t| ----------- --- --- |\n"; | |
cout << "\t| | 0 | | . | | = | |\n"; | |
cout << "\t| ----------- --- --- |\n"; | |
continue; | |
} | |
} | |
cout << "\t -------------------------------------\n"; | |
} | |
int main() | |
{ | |
Kkupdaeki nemo; | |
nemo.DrawTriangle(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment