利用键盘缓冲区 来做
#include "stdlib.h"
#include "stdio.h"
void main()
{
int num;
while(scanf("%1d",&num))/*每次读入一个数字*/
{
switch(num)
{
case 1:printf("one\t");break;
case 2:printf("two\t");break;
case 3:printf("three\t");break;
case 4:printf("four\t");break;
case 5:printf("five\t");break;
case 6:printf("six\t");break;
case 7:printf("seven\t");break;
case 8:printf("eight\t");break;
case 9:printf("nine\t");break;
case 0:printf("zero\t");break;
}
}
}
羊肉串 葡萄干 哈密瓜!!