从大到小

来源:互联网 发布:淘宝城四期规划 编辑:程序博客网 时间:2024/03/29 05:21
#include <stdio.h>int main(){    float S=0,T,N;    printf("请输入N:");    scanf("%f",&N);      while (N>=2)      {          T=1/(N*N-1);          N=--N;          S+=T;      }      printf("S=%f \n ",S);      system("pause");      return 0;} 

0 0
原创粉丝点击