aboutsummaryrefslogtreecommitdiff
path: root/entries/braxtonh/homework
diff options
context:
space:
mode:
authorbraxtonhall2022-10-23 19:27:49 +0000
committerbraxtonhall2022-10-23 19:27:49 +0000
commit77ffde450e92ffe6527c35ffc2383b17d4c04f68 (patch)
tree65a560a18f1952114727e05872fce3f149e660e4 /entries/braxtonh/homework
parentb5b18e46e3a5c4daaa3b4613395b1a216a47bc17 (diff)
Rename directory to use GitHub ID
Diffstat (limited to 'entries/braxtonh/homework')
-rw-r--r--entries/braxtonh/homework/fib.cpp32
-rw-r--r--entries/braxtonh/homework/fib.hpp4
2 files changed, 0 insertions, 36 deletions
diff --git a/entries/braxtonh/homework/fib.cpp b/entries/braxtonh/homework/fib.cpp
deleted file mode 100644
index 900c9d0..0000000
--- a/entries/braxtonh/homework/fib.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "fib.hpp"
-
-#include <string>
-#include <iostream>
-#include <stdexcept>
-
-using namespace std;
-
-int Fibonacci::fib(const int n) const
-{
- // cout << "start" << endl;
- if (n < 0) {
- // HOW??
- cout << "wtfff got ( " << n << " )" << endl;
- // https://stackoverflow.com/questions/8480640/how-to-throw-a-c-exception
- throw invalid_argument("received negative value");
- } else if (n == 0) {
- // cout << "********************* LINE 12" << endl;
- // https://stackoverflow.com/questions/1451170/in-the-fibonacci-sequence-is-fib0-0-or-1
- return 0; //1; ??????
- } else if (n == 1) {
- // cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LINE 15" << endl;
- return 1;
- } else {
- // cout << "GOT TO LINE 19" << endl;
- // cout << "got here" << endl;
- // int retVal = fib(n - 1) + fib(n - 2);
- return fib(n - 1) + fib(n - 2);
- // // cout << "here" << endl;
- // cout << "returning: (" << retVal << " )" << endl;
- }
-}
diff --git a/entries/braxtonh/homework/fib.hpp b/entries/braxtonh/homework/fib.hpp
deleted file mode 100644
index a7bbd30..0000000
--- a/entries/braxtonh/homework/fib.hpp
+++ /dev/null
@@ -1,4 +0,0 @@
-class Fibonacci
-{
- int fib(const int n) const;
-};