运用菜单为何总是不能输入正确??
#include"stdio.h"main()
{char ch1,ch2;
int i;
printf("请选择相应的操作:\n1:小写转换大写\n2:大写转换小写\n0:输入错误\n");
scanf("%d",&i);
printf("\n选择菜单i=%d:\n\n",i);
switch(i)
{case 1:
printf("请输入小写字母ch1=");
scanf("")
printf("请输入小写字母ch1=");
ch2=getchar();
ch1=ch1-32;ch2=ch1-32;
printf("ch1=%c\n",ch1);
printf("ch1=%c\n",ch2);
break;
case 2:printf("\n请输入大写字母ch1=");
ch1=getchar();
printf("\n请输入大写字母ch1=");
ch2=getchar();
ch1=ch1+32;ch2=ch2+32;
printf("ch1=%c\n",ch1);
printf("ch2=%c\n",ch2);
break;
default:printf("0:输入错误\n\n");
}
}