//Ex3_19.cpp
#include "iostream" 
using namespace std;
void main() 
{
 long f1,f2,f,s;
 int i;
 f1=f2=1;
 s=f1+f2;   //前两项的和作为初值
 cout<<f1<<" "<<f2;
 for(i=3;i<=20;i++)  //产生3到20项
 {
  f=f1+f2;
  cout<<" "<<f;
  s=s+f;
  f1=f2;
  f2=f;
 }
 cout<<"\ns="<<s<<endl;
}
