循环结构编程练习问题
#include <stdio.h>int main()
{
double num1, num2;
int num3;
printf("Please type in num3:");
scanf_s("%d", &num3);
num1 = 1;
num2 = 1;
while (num2 >= num3);
{
num1 = num1 + 1 / (num2);
num2++;
}
printf("The value of num1 is %f", num1);
return 0;
}
编完这个程序,运行后编译毫无问题,但运行时产生错误,编译器显示
错误 LNK1168 无法打开 c:\users\14910\documents\visual studio 2015\Projects\ConsoleApplication20\Debug\ConsoleApplication20.exe 进行写入 ConsoleApplication20 c:\Users\14910\documents\visual studio 2015\Projects\ConsoleApplication20\ConsoleApplication20\LINK 1
求解答是何问题?