标签:i++ ble float 定义 include sqrt pause stdio.h 加载
#include "stdio.h"
#include "math.h"
#include "stdlib.h"
void main()
{
float i,x,y;
for (i=1;i<100000;i++)
{x=sqrt(i+100);
y=sqrt(i+168);
if(x*x==i+100&&y*y==i+168)
printf("\n%.2f\n",i);
}
system("pause");
}
1.加载"math.h"库文件;
2.double/float sqrt(double/float);
3.必须先定义参数才能使用。
标签:i++ ble float 定义 include sqrt pause stdio.h 加载
原文地址:http://www.cnblogs.com/cxr1234/p/6131316.html