调试未完成,终止调试之后就程序就不能运行了但是重新再建一个工作台又可以了这是....
#include <stdio.h>#include <math.h>
void main()
{
int a=1;
double n=1,pi=0,temp=0;
while (fabs (1/n) > 1/100)
{
temp = temp + 1/n;
a = a * (-1);
n = n * (-1) + a * 2;
}
pi = temp * 4;
printf("PI = %lf\n",pi );
}
--------------------Configuration: PI002 - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1168: cannot open Debug/PI002.exe for writing
Error executing link.exe.
PI002.exe - 1 error(s), 0 warning(s) 应该是你已经在运行这个程序了,彻底关闭后才能再次执行
页:
[1]