#include
using namespace std;
int main()
{
float a,b,c,d,e,f;
cin>>a;
cin>>b;
if (a !=0 && b!=0)
{
c=a+b;
d=a-b;
e=a*b;
f=a/b;
cout<<"和是:"<
else
cout<<"error"<
}
#include
int main()
{
float a,b,c,d,e,f;
scanf("%f",&a);
scanf("%f",&b);
c=a+b;
d=a-b;
e=a*b;
f=a/b;
printf("和是:%f,差是:%f,积是:%f,商是:%f",c,d,e,f);
return 0;
}
main()
{
float a,b,c,d,e,f;
scanf("%f%f",&a,&b);
if(a!=0&&b!=0)
{c=a+b;
d=a-b;
e=a*b;
f=a/b;}
printf("sum;%f difference;%f product;%f quotient;%f",c,d,e,f);
}
sclieb 这个东西么?
95199252 来分给你
# include
void main(){
float a,b;
printf("please input a,b:");
scanf("%f%f",&a,&b);
printf("a+b=%.2f\n",a+b);
printf("a-b=%.2f\n",a-b);
printf("a*b=%.2f\n",a*b);
printf("a/b=%.2f\n",a/b);
}