输入一个3位数,计算该数各位上的数字之和,如果在[1,12]之内,则输出与和数相对应的月份的英文
问题描述:
输入一个3位数,计算该数各位上的数字之和,如果在[1,12]之内,则输出与和数相对应的月份的英文
如果可以帮我修改一下我编的程序,要求用指针
#include
void main()
{int n,t;
char str[50],*p[12]={"Janury","February","March","April","May","June","July","August","September","October","November","December"};
printf("请输入一个三位数:\n");
scanf("%d",&n);
t=n/100+(n%100)/10+n%10;
if(t>=1&&t
答
请输入一个三位数:
111
March
Press any key to continue
#include
void main()
{
int n,t;
char *p[12]={"Janury","February","March","April","May","June","July","August","September","October","November","December"};
printf("请输入一个三位数:\n");
scanf("%d",&n);
t=n/100+(n%100)/10+n%10;
if(t>=1&&t