#include<iostream.h>
#include<stdio.h>
double add_1(double a,double b)
{
double A;
A=b+a;
return A;
}
double sub_2(double c,double d)
{
double B;
if (c>=d)
B=c-d;
else
B=d-c;
return B;
}
double cheng_3(double e,double f)
{
double C;
C=e*f;
return C;
}
double chu_4(double g,double h)
{
double D;
D=g/h;
return D;
}
void main()
{ double z,k;
cout<<"*******************************";
cout<<"Welcome to my calculate system";
cout<<"*******************";
cout<<"Please input two figures:"<<endl;
cin>>z>>k;
add_1(z,k);
sub_2(z,k);
cheng_3(z,k);
chu_4(z,k);
cout<<"add_1="<<add_1(z,k)<<endl;
cout<<"sub_2="<<sub_2(z,k)<<endl;
cout<<"cheng_3="<<cheng_3(z,k)<<endl;
if(k=0.00)
cout<<"error!"<<endl;
else
cout<<"chu_4="<<chu_4(z,k)<<endl;
getchar();
}
这个代码中的if 语句的功能为什么没法实现啊?