第1个回答 2012-10-17
#include<stdio.h>
#include<math.h>
void main()
{
char cInput;
while (1)
{
fflush(stdin);
printf("Please Input Your Command:\n");
scanf("%c", &cInput);
switch (cInput)
{
case 'A':
printf("Your Command is %c\n", cInput);
break;
case 'B':
printf("Your Command is %c\n", cInput);
break;
case 'E':
exit(1);
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
printf("the number you input is %c\nthe product of the number is (y)\n", cInput);
break;
default:
printf("Input incorrect ,please input again!\n");
}
}
}