其他:#include<stdio.h>
void main()
{
int mun ,operator,a,b;
printf("请输入两个:");
scanf("%d",&a,&b);
switch(operator)
case "+":
case "-":
case "*":
case "/":
printf("%d",mun=a operator b);
} #include<stdio.h>
#include<math.h>
int main(void)
{
int a=0,b=0,c=0;
char ch;
scanf("%d,%d",a,b);
swtich(ch)
{
case'+':c=a+b;break;
case'-':c=a-b;break;
case'*':c=a*b;break;
case'/':c=a/b;break;
defual:printf("Please input the right sign.");break;
}
printf("%d%c%d=%d",a,ch,b,c);
return 0;
}
上一个:VC++中报错“cannot open file '.\Debug\BtnST.sbr': No such file or directory
下一个:计算机二级c语言考题是否年年都编新的