mfc 计算器中sin ,log ,和ln函数怎么写
在我的源程序上修改.
有意的,我把源程序发过来.
void CMy2008110139Dlg::OnBUTTONdaoshu() //求倒数运算
{
// TODO:Add your control notification handler code hereif(m_val=='0')
if(m_val=='0')
{
m_val="除数不能为零";
UpdateData(false);
}
else
{
double c;
UpdateData();
a=atof(m_val);
c=1/a;
m_val.Format("%f",c);
UpdateData(false);
}
}
void CMy2008110139Dlg::OnBUTTONpingfang() //求平方运算
{
// TODO:Add your control notification handler code here
double c;
UpdateData();
a=atof(m_val);
c=a*a;
m_val.Format("%f",c);
UpdateData(false);
}
void CMy2008110139Dlg::OnBUTTONsin()
{
// TODO:Add your control notification handler code here
这里的代码怎么写?
人气:409 ℃ 时间:2020-01-22 19:01:50
解答
double c;
UpdateData();
c=sin(a);
m_val.Format("%f",c);
UpdateData(false);
在头文件中添加"math.h"
推荐
- 在计算器中,sin.cos.tan.ln.log.abs.exp.急用,
- 谁能给我个好点的计算器,能算sin,根号,ln,log的?
- log2 3在函数计算器上的按键步骤是怎样的?
- sin cos tan ln (计算器语言)
- 科学计算器里的 ,sin,cos,ton,log,ln算什么的时候用的上.请一一详细举例说明
- Not knowing whether he's dead or alive is a terrible feeling.求这句话语法详解!
- 关于毕业离别的优美句子 有关离别的伤感句子 关于离别的英语句子
- 由曲线y=x2与直线y=x+2围成的封闭图形的面积为_.
猜你喜欢