> 其他 >
小明今年12岁,他母亲比他大20岁.编写一个程序计算出小明的母亲在几年后比小明的年龄大1出小明的母亲在几
小明今年12岁,他母亲比他大20岁.编写一个程
序计算出小明的母亲在几年后比小明的年龄大1
倍,那时他们两人的年龄各是多少?
人气:166 ℃ 时间:2019-09-06 09:01:56
解答
#include
main()
{
int i, children=12,mother=32;
for(i=0;mother/children!=2;children++,mother++)
i+=1;
printf("mother=%d,children=%d,i=%d\n",mother,children,i);
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版