标签:for turn col clu return 运算 ++ include printf
1 #include<stdio.h> 2 int main() 3 { 4 float sum,i,j,z; //整数的除法运算只取整 5 sum = 0.0; 6 z = 0.0; 7 int k = 1; 8 for (i = 2.0, j = 1.0; k <= 10;k++) 9 { 10 sum += i / j; 11 z = i; 12 i = i + j; 13 j = z; 14 } 15 printf("sum = %f", sum); 16 17 18 return 0; 19 }
标签:for turn col clu return 运算 ++ include printf
原文地址:https://www.cnblogs.com/old-horse/p/12686513.html