一道数学求解!能解出来,请给出求解思路和公式,谢谢!学校学的全还回去了……
设置n m两个变量
就是让n初始为10,让n初始为2
n每次循环*10,m每次循环+2
计算 n/m 即可
你题目的解答代码如下:
#include <stdio.h>
int main()
{
int i;
double n=10,m=2;
for (i = 0; i < 10; i++)
{
printf("%.2f\n", n/m);
n *= 10;
m += 2;
}
return 0;
}
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!