pe30.c
来自「C语言编程与设计也是一些文章」· C语言 代码 · 共 23 行
C
23 行
#include "conio.h"
#include "math.h"
#include "stdio.h"
double countValue(int n)
{int i;
double k=0;
for(i=1;i<=n;i++)
if(i%21==0) k+=i;
k=sqrt(k);
return k;
}
main()
{FILE *fp;
fp=fopen("out.dat","w");
clrscr();
printf("%f",countValue(1000));
fprintf(fp,"%f",countValue(1000));
fclose(fp);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?