C语言中,开方函数sqrt()怎么用?本人是初学者,举个简单的例子,下面这个程序,怎么输出a的开方数?#include#includevoid main(){int a=25,s;s=sqrt(a);printf("s=%f",sqrt(25));}LINK :fatal error LNK1168:cannot open Debug/1.exe f
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/18 02:00:55
![C语言中,开方函数sqrt()怎么用?本人是初学者,举个简单的例子,下面这个程序,怎么输出a的开方数?#include#includevoid main(){int a=25,s;s=sqrt(a);printf(](/uploads/image/z/1976505-33-5.jpg?t=C%E8%AF%AD%E8%A8%80%E4%B8%AD%2C%E5%BC%80%E6%96%B9%E5%87%BD%E6%95%B0sqrt%28%29%E6%80%8E%E4%B9%88%E7%94%A8%3F%E6%9C%AC%E4%BA%BA%E6%98%AF%E5%88%9D%E5%AD%A6%E8%80%85%2C%E4%B8%BE%E4%B8%AA%E7%AE%80%E5%8D%95%E7%9A%84%E4%BE%8B%E5%AD%90%2C%E4%B8%8B%E9%9D%A2%E8%BF%99%E4%B8%AA%E7%A8%8B%E5%BA%8F%2C%E6%80%8E%E4%B9%88%E8%BE%93%E5%87%BAa%E7%9A%84%E5%BC%80%E6%96%B9%E6%95%B0%3F%23include%23includevoid+main%28%29%7Bint+a%3D25%2Cs%3Bs%3Dsqrt%28a%29%3Bprintf%28%22s%3D%25f%22%2Csqrt%2825%29%29%3B%7DLINK+%3Afatal+error+LNK1168%3Acannot+open+Debug%2F1.exe+f)
C语言中,开方函数sqrt()怎么用?本人是初学者,举个简单的例子,下面这个程序,怎么输出a的开方数?#include#includevoid main(){int a=25,s;s=sqrt(a);printf("s=%f",sqrt(25));}LINK :fatal error LNK1168:cannot open Debug/1.exe f
C语言中,开方函数sqrt()怎么用?本人是初学者,举个简单的例子,下面这个程序,怎么输出a的开方数?
#include
#include
void main()
{
int a=25,s;
s=sqrt(a);
printf("s=%f",sqrt(25));
}
LINK :fatal error LNK1168:cannot open Debug/1.exe for writing
执行 link.exe 时出错.
为什么会有一个错误?
C语言中,开方函数sqrt()怎么用?本人是初学者,举个简单的例子,下面这个程序,怎么输出a的开方数?#include#includevoid main(){int a=25,s;s=sqrt(a);printf("s=%f",sqrt(25));}LINK :fatal error LNK1168:cannot open Debug/1.exe f
#include<stdio.h>
#include<math.h>
void main()
{
double a=25,s;
s=sqrt(a);
printf("s=%.2lf\n",s);
}
sqrt的原型:double sqrt(double x),输出格式是%lf,你在看看