填空题 以下程序运行时,输出到屏幕的结果中第一行是 1,第二行是 2
#include<iomanip.h>
#include<iostream.h>
int main()
{
int i,m=1,n=1;
cout<<setw(10)<<m<<setw(10)<<n;
for(i=2;i<9;i++)
{
n=n+m;
m=n-m;
if(i%3==0)
cout<<endl;
cout<<setw(10)<<n;
}
return 0;
}
【正确答案】
【答案解析】1 1 2、3 5 8