求各位大大指点我一下
#include <stdio.h>#include <stdlib.h>
int main (void)
{
int year = 0;
int month = 0;
int day = 0;
scanf ("%d\n",&year);
scanf ("%d\n",&month);
if ( month >12 || month <1 )
{
printf ("this month is nothingness ,input again !");
if (day >31 || day <1)
printf ("your error !");
}
if (day >31 || day <1)
{
day = 32;
switch (day)
{
case 1 : case 21 : case 31:
printf ("today is %dst %d %d",day,month,year);
break;
case 2: case 22:
printf("today is %dnd %d %d",day,month,year);
break;
case 3: case 23:
printf ("today is %drd %d %d",day,month,year);
break;
case 32:
printf ("your error !");
break;
default :
printf ("today is %dth %d %d",day,month,year);
break;
}
}
system ("pause");
return 0;
}
求各位大大帮我看看我这段写的还有问题。还有求各位大大指点一下怎么在最后的输出中将数字月份的输出编程英文月份的描述,需要怎么操作?