我是名新手,下列程序哪里错误如何纠正,请大神赐教
#include <stdio.h>void main()
{
float num1,num2,result;
char operate;
printf("Please enter operator:");
scanf("c",&operate);
printf("Please enter two numbers:");
scanf("%f,%f",&num1,&num2);
switch (operate)
{
case'+':
result=num1+num2;
printf("%5.2f+%5.2f=%5.2f",num1,num2,result);
break;
case'-':
result=num1-num2;
printf("%5.2f-%5.2f=%5.2f",num1,num2,result);
break;
case'*':
result=num1*num2;
printf("%5.2f*5.2f=%5.2f",num1,num2,result);
break;
case'/'
if (num!=o)
{
result=num1/num2;
printf("%5.2f/%5.2f=%5.2f",numi,num2.result);
}
else
printf("In a division operation, the divisor can not be zero);
break;
default:
printf("The operator is invalid");
}
}