#include
float add(float a, float b)
{
return (a + b);
}
float minus(float a, float b)
{
return (a - b);
}
float multiply(float a, float b)
{
return (a * b);
}
float divide(float a, float b)
{
return (a / b);
}
int main(void)
{
printf("Please insert two numbers: \n");
float a, b;
scanf("%f,%f",&a,&b);
float result;
result = add(a,b);
printf("The result of addition is: %f\n",result);
result = minus(a,b);
printf("The result of minus is: %f\n",result);
result = multiply(a,b);
printf("The result of multiplication is: %f\n",result);
result = divide(a,b);
printf("The result of division is: %f\n",result);
return 0;
}
谢谢,望采纳!加油!