Advertisement
Guest User

Untitled

a guest
Jan 24th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream> // cout
  2. #include <cstdlib> // atoi
  3.  
  4. void fibonacci(int max);
  5.  
  6. int main(int argc, char **argv)
  7. {
  8. if (argc < 2)
  9. {
  10. std::cout << "You must specify the"
  11. << " fibonacci numbers to generate.\n";
  12. return 1;
  13. }
  14.  
  15. int size = std::atoi(argv[1]);
  16. fibonacci(size);
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement