fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. int m, a, b, c;
  9.  
  10. a = 0;
  11. b = 1;
  12.  
  13. cout << "enter a numeric greater than 1" << endl;
  14. cin >> m;
  15.  
  16. if (m < 1)
  17. {
  18. cout << "\t\t\t\t\tUNACCEPTABLE!!";
  19. cin >> m;
  20. }
  21.  
  22. else
  23. {
  24.  
  25. while (c < m)
  26. {
  27. c = a + b;
  28. a = c;
  29. c = a + b;
  30. b = c; //oh fuck this shit
  31. }
  32. cout << c;
  33. }
  34. return(0);
  35.  
  36. }
  37.  
Success #stdin #stdout 0s 15240KB
stdin
2
stdout
enter a numeric greater than 1
2