一、N-S流程图;
二、运行结果;
三、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>int main()
{//初始化变量值;float b = 100;float sum = 0;int i = 0;//运算;for (i = 1; i <= 10; i++){//运算;sum = sum + b;b = b / 2;}//输出结果;printf("第10次落地经过%f米,反弹%f米!!!!\n", sum, b);return 0;
}