小白求助……一个选择性结构的程序
要求输入一个两位数输出器英文单词,下面是我编写的程序,但是程序无法正常运行,求助……#include<stdio.h>
int main()
{
int x,m,n;
printf("请输入一个两位数:");
scanf("%d",&x);
m=x/10;
n=x-10*m;
printf("您输入的两位数是:");
if(n=0)
{
switch(m)
{
case'1':printf("ten\n");break;
case'2':printf("twenty\n");break;
case'3':printf("thirty\n");break;
case'4':printf("forty\n");break;
case'5':printf("fifty\n");break;
case'6':printf("sixty\n");break;
case'7':printf("seventy\n");break;
case'8':printf("eighty\n");break;
case'9':printf("ninety\n");break;
}
}
else if(m=1)
{
switch(n)
{
case'1':printf("eleven\n");break;
case'2':printf("twelve\n");break;
case'3':printf("thirteen\n");break;
case'4':printf("fourteen\n");break;
case'5':printf("fifteen\n");break;
case'6':printf("sixteen\n");break;
case'7':printf("seventeen\n");break;
case'8':printf("eighteen\n");break;
case'9':printf("nineteen\n");break;
}
}
else if(m>=2)
{
{
switch(m)
{
case'2':printf("twenty-\n");break;
case'3':printf("thirty-\n");break;
case'4':printf("forty-\n");break;
case'5':printf("fifty-\n");break;
case'6':printf("sixty-\n");break;
case'7':printf("seventy-\n");break;
case'8':printf("eighty-\n");break;
case'9':printf("ninety-\n");break;
}
}
{
switch(n)
{
case'1':printf("ten\n");break;
case'2':printf("twenty\n");break;
case'3':printf("thirty\n");break;
case'4':printf("forty\n");break;
case'5':printf("fifty\n");break;
case'6':printf("sixty\n");break;
case'7':printf("seventy\n");break;
case'8':printf("eighty\n");break;
case'9':printf("ninety\n");break;
}
}
}
return 0;
}