用vs2013,显示未定义标识符default,还有我这写的代码有问题吗?刚学switch语句。
#include<stdio.h>int main()
{
float a, b;
char c;
printf("please enter two number and operator:\n");
scanf_s("%d %d %c", &a, &b,&c);
switch (c)
{
case '+':printf("%d", a + b); break;
case '-':printf("%d", a - b); break;
case '*':printf("%d", a * b); break;
case '/':printf("%d", a / b); break;
default;
}
return
}