我这样写错在哪里了
以前用VC++,到vs2005上来就不知道该怎么用了
老是提示我错误
说找不到iostream
#include<iostream.h>
int main()
{
int an,n;
int a0=0;
int a1=1;
int a2=1;
int sum=0;
cout<<"Please input an integer:"<<endl;
cin>>n;
switch(n)
{
case 0:
cout<<"a0="<<a0<<endl;
cout<<"sum="<<a0<<endl;
break;
case 1:
cout<<"a1="<<a1<<endl;
cout<<"sum="<<a0+a1<<endl;
break;
default:
for(int i=2;i<=n;i=i+1)
{
an=a0+a1;
sum=sum+an;
a0=a1;
a1=an;
}
cout<<"a"<<n<<"="<<an<<endl;
cout<<"sum="<<sum<<endl;
}
return 0;
}