标签:style ble clu return span pre int turn class
#include<stdio.h> int main(){ int i,n; scanf("%d",&n); float sum=0.0; float a=1; float b=2; for(i=1;i<=n;i++){ sum=sum+1.0*b/a; int c=a; a=b; b=c+b; } printf("s=%.2f\n", sum); return 0; }
Problem H: 计算数列和2/1,3/2,5/3,8/5......
标签:style ble clu return span pre int turn class
原文地址:https://www.cnblogs.com/chenlong991223/p/9824773.html