#define _CRT_SECURE_NO_WARNINGS 1#include#includeint main(){int i,n;double s=0.0;printf("输入任意一个自然数: ");scanf("%d",&n);for(i=1;i<n;i++){if(i%3==0&&i%7==0){s+=i;}}s=sqrt(s);printf("%lf\n",s);return 0;}
//函数名: sqrt//功 能: 计算平方根//用 法: double sqrt(double x);//需要添加 #include 头文件#include #include int main(void){double x = 4.0, result;result = sqrt(x);printf("The square root of %lf is %lf\n", x, result);return 0;}