c语言求80+2的y次方是否为完全平方数有错误吗?#include #include #includ
网友回答
注释的地方有错,修改过后可运行了,你看看
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
main()
{
int x,i=1;
float n,m;
scanf("%d",&x);
n=80+pow(2.0,x);
m=sqrt(n);
printf("%f\n",m);
if ((int)m == m) //条件改一下
printf("%d可以\n",x);
else
printf("%d不可以\n",x);
//这几句干什么的? // i=++i;
// x=++x;
// do i>99;
system("pause");
return 0; }