diff options
Diffstat (limited to 'homework 4/program.cpp')
| -rw-r--r-- | homework 4/program.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/homework 4/program.cpp b/homework 4/program.cpp index 4eee49e..4c3f420 100644 --- a/homework 4/program.cpp +++ b/homework 4/program.cpp @@ -36,18 +36,18 @@ void PrintFibonacci(size_t n) { for (int i = 1; i <= k; ++i) { if (i == 1) { - cout << t1 << ", "; + cout << t1 << " "; continue; } if (i == 2) { - cout << t2 << ", "; + cout << t2 << " "; continue; } nextTerm = t1 + t2; t1 = t2; t2 = nextTerm; - cout << nextTerm << ", "; + cout << nextTerm << " "; } @@ -108,14 +108,7 @@ int main() { PrintFibonacci(i); } - else if (i == 4) - { - return 0; - } - else - { - cout << "Print Menu"; - } + int j; Menu(); @@ -123,7 +116,7 @@ int main() { i = j; } - + return 0; } |