计算器源码

时间:2018-09-07 03:12:24
【文件属性】:

文件名称:计算器源码

文件大小:55.24MB

文件格式:RAR

更新时间:2018-09-07 03:12:24

vs2010 mfc

mfc简易计算器 #include "stdafx.h" #include "Calculate.h" Calculate::Calculate() { m_Putout=number1=number2=0.0; OperationState=NumberState=1; } void Calculate::Cal(int OperationState) { switch(OperationState) { case 1:m_Putout=(double)number1/number2; NumberState=1; //UpdateData(FALSE); break; case 2:m_Putout=number1*number2; NumberState=1; //UpdateData(FALSE); break; case 3:m_Putout=number1+number2; NumberState=1; //UpdateData(FALSE); break; case 4:m_Putout=number1-number2; NumberState=1; //UpdateData(FALSE); break; } number1=m_Putout; OperationState=0; } double Calculate::Show(int n) { if(NumberState==1) { m_Putout=m_Putout*10+n; number1=m_Putout; //UpdateData(FALSE); } else { m_Putout=m_Putout*10+n; number2=m_Putout; //UpdateData(FALSE); } return m_Putout; } void Calculate::Clear() { m_Putout=number1=number2=0.0; OperationState=0; NumberState=1; }


【文件预览】:
Calculate
----cal.sdf(62.58MB)
----cal.sln(876B)
----Calculator.exe(154KB)
----cal()
--------stdafx.cpp(136B)
--------cal.aps(105KB)
--------cal.h(424B)
--------Release()
--------res()
--------stdafx.h(2KB)
--------calDlg.h(774B)
--------calDlg.cpp(7KB)
--------targetver.h(234B)
--------cal.vcxproj(6KB)
--------Calculate.cpp(950B)
--------cal.rc(12KB)
--------resource.h(3KB)
--------cal.cpp(2KB)
--------cal.vcxproj.user(143B)
--------Debug()
--------Calculate.h(286B)
--------cal.vcxproj.filters(2KB)
--------ReadMe.txt(3KB)
----ipch()
--------cal-ae79ef71()
----Debug()
--------Calculator.pdb(4.77MB)
--------Calculator.exe(154KB)
--------Calculator.ilk(971KB)
----cal.suo(17KB)
----Calculator.suo(9KB)

网友评论