云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > VC++课程设计

VC++课程设计

  • 62 次阅读
  • 3 次下载
  • 2025/5/1 5:22:44

科学计算器设计

m_xx=m_xx+\ str='f';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onkf() { s2=\ s1=m_xx;

m_xx=m_xx+\ str='k';

UpdateData(false); // TODO: Add your control notification handler code here }

void CMyDlg::Onln() {s2=\ s1=m_xx; m_xx=\ str='l';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onlog() { s2=\ s1=m_xx;

m_xx=\ str='g';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onpf()

- - 16 - -

科学计算器设计

{s2=\ s1=m_xx; m_xx=m_xx+\ str='p';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onsin() {s2=\ s1=m_xx;

m_xx=\ str='s';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onsub() { s2=\ s1=m_xx; m_xx=m_xx+'-'; str='-';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onsze() { s2=\ int n,i,t; double Y,p=0.0;

Y=strtod( m_xx,NULL); t=(int)(Y); if(t!=1)

for(i=1;t>1;i++)

- - 17 - -

科学计算器设计

{

n=t%2; t=t/2;

p+=n*pow(10,(i-1)); }

p+=1*pow(10,(i-1)); m_xx.Format(\

UpdateData(false);// TODO: Add your control notification handler code here }

void CMyDlg::Ontan() {s2=\ s1=m_xx;

m_xx=\ str='t';

UpdateData(false);

// TODO: Add your control notification handler code here }

void CMyDlg::Onxy() { s2=\ s1=m_xx; m_xx=m_xx+\ str='^';

UpdateData(false); // TODO: Add your control notification handler code here }

void CMyDlg::Onds() {s2=s2+\ m_xx=m_xx+\

- - 18 - -

科学计算器设计

UpdateData(false);

// TODO: Add your control notification handler code here }

(2)函数功能说明

整个计算器除了基本的加、减、乘、除运算外,另外还有8个功能,实现八大运算:三角函数运算功能、对数函数运算功能、指数函数运算功能、乘方运算功能、平方运算功能、根式运算功能、进制转换功能、归零功能。各个运算功能的详细设计说明分别如下: 1、基本运算功能

主要实现数据的加、减、乘、除运算,提供简单的科学计算! 2、三角函数运算功能

用来执行三角函数的运算,包括正弦函数(sin)、余弦函数(cos)、正切函数(tan)和余切函数(cot)。 3、对数函数运算功能

用来执行对数函数的运算,包括以e为底ln函数和以10为底的lg函数。 4、指数函数运算功能 用来执行指数函数的运算。 5、乘方运算功能

用来执行乘方的运算,进行数值的成倍计算。 6、平方运算功能

用来执行平方运算,说到底它也属于乘方运算的范畴。 7、根式运算功能 用来执行根式的运算。 8、进制转换运算功能

主要实现数值间的转换,包括二进制转十进制、十进制转二进制和八进制转二进制的运算。

二进制转十进制N-S流程图:

int len; double sum=0.0,num; len=strlen(m_xs); int i=0;i

搜索更多关于: VC++课程设计 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

科学计算器设计 m_xx=m_xx+\ str='f'; UpdateData(false); // TODO: Add your control notification handler code here } void CMyDlg::Onkf() { s2=\ s1=m_xx; m_xx=m_xx+\ str='k'; UpdateData(false); // TODO: Add your control notification handler code here } void CMyDlg::Onln() {s2=\ s1=m_xx; m_xx=\ str='l'; UpdateData(

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com