一、题目;
二、N-S流程图;
三、运行结果;
四、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>int main()
{//初始化变量值;int i = 0;int j = 0;float result1 = 0;float result2 = 0;float result3 = 0;float sum = 0;//运算;for (i = 1; i <= 100; i++){//运算;result1 = result1 + i;}for (j = 1; j <= 50; j++){//运算;i = j * j;result2 = result2 + i;}for (j = 1; j <= 10; j++){//运算;i = 1 / j;result3 = result3 + i;}//相加;sum = result1 + result2 + result3;//输出结果;printf("结果为:%f", sum);return 0;
}