现在我的代码将 37 写成 7 3。我怎么能把它换成三七?除了那个开关之外,我目前还需要完成这项工作所需的所有其他东西。请帮忙!
#include <stdio.h>
int main (void)
{
int x;
printf("Please enter an integer: ");
scanf("%d", &x);
printf("\nYou have entered:\n\n");
do{
switch (x%10)
{
case 0:
printf("zero ");
break;
case 1:
printf("one ");
break;
case 2:
printf("two ");
break;
case 3:
printf("three ");
break;
case 4:
printf("four ");
break;
case 5:
printf("five ");
break;
case 6:
printf("six ");
break;
case 7:
printf("seven ");
break;
case 8:
printf("eight ");
break;
case 9:
printf("nine ");
break;
};
x=x/10;
}while(x>0);
printf("\n\n");
return 0;
}