代码不工作
#include <stdio.h>int main(void) 编译的时候提示执行不到的代码
{
unsigned int month = 0u;
unsigned int data = 0u;
unsigned int years = 0u;
printf("输入三个整数: ");
scanf("%u %u %u\n",&month,&data,&years);
if(data <=31 && data >= 1)
{if(data == 1 || data == 21 || data == 31)
printf("%u st\n",data);
if(data == 2 || data == 22)
printf("%u nd\n",data);
if(data == 3 || data == 23)
printf("%u rd\n",data);
if(data >=4 && data <= 31)
printf("%u th\n",data);
}
else
printf("请输入1到31之间的整数");
if(month >= 1 && month <= 12)
{if(month==1)
printf(" January");
else if(month==2)
printf(" Februar");
else if(month==3)
printf(" March");
else if(month==4)
printf(" April");
else if(month==5)
printf(" May");
else if(month==6)
printf(" June");
else if(month==7)
printf(" July");
else if(month==8)
printf(" August");
else if(month==9)
printf(" September");
else if(month==10)
printf(" October");
else if(month==11)
printf(" November");
else if(month==12)
printf(" December");
}
else
printf("请输入1到12之间的整数");
if(years <= 1900 && years >= 2099)
printf("%u\n",years);
else
printf("请输入1900到2099之间的整数");
return 0;
}