powerunlimited

[1011] 工程式設計 作業3

Nov 4th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.12 KB | None | 0 0
  1. while(a<=n){
  2.         fn=f0+f1;
  3.         f0=f1;
  4.         f1=fn;
  5.         if(a!=n)
  6.         cout<<fn<<", ";
  7.         else
  8.         cout<<fn<<endl;
  9.         ++a;
  10.         }
Advertisement
Add Comment
Please, Sign In to add comment