C++程序的fatal error LNK1120:1 unresolved externals问题
#include<iostream.h>doublef(doublex,doubley){doubleZ;Z=y-2*x/y;returnZ;}voidmain(){do...
# include <iostream.h>
double f(double x,double y)
{double Z;
Z=y-2*x/y;
return Z;
}
void main()
{ double x,y,h,N,n,p,q;
cout<<"请输入初值x、y,步长h,步数N:";
cin>>x>>y>>h>>N;
n=1;
p=0;
q=0;
while (n<N)
{p=y+h*f(x,y);
x=x+h;
q=y+h*f(x,p);
y=(q+p)/2;
n=n+1;
}
cout<<"???:"<<y<<endl;
} 展开
double f(double x,double y)
{double Z;
Z=y-2*x/y;
return Z;
}
void main()
{ double x,y,h,N,n,p,q;
cout<<"请输入初值x、y,步长h,步数N:";
cin>>x>>y>>h>>N;
n=1;
p=0;
q=0;
while (n<N)
{p=y+h*f(x,y);
x=x+h;
q=y+h*f(x,p);
y=(q+p)/2;
n=n+1;
}
cout<<"???:"<<y<<endl;
} 展开
展开全部
VC 6.0 编译器设置问题,
project->setting->Link, 在Project options中将 /subsystem:windows.改为
/subsystem:console
保存设置,Rebuild All.
project->setting->Link, 在Project options中将 /subsystem:windows.改为
/subsystem:console
保存设置,Rebuild All.
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |