输入一个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("请输入一个三位数:
");
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("请输入一个三位数:
");
scanf("%d",&n);
t=n/100+(n%100)/10+n%10;
if(t>=1&&t
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点