Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions welcome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,18 @@ int main(int argc, char *argv[]) {
std::cout << "Input your first favorite number: \n";
int inputNumber1, inputNumber2;
std::cin >> inputNumber1;
while(inputNumber1 > 25) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 25 and not 22

magic number moment

std::cout << "no." << std::endl;
std::cout << "Try again." << std::endl;
std::cin >> inputNumber1;
}
std::cout << "Input your second favorite number: \n";
std::cin >> inputNumber2;
while(inputNumber2 > 25) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

std::cout << "stop it." << std::endl;
std::cout << "Try again." << std::endl;
std::cin >> inputNumber2;
}
std::cout << "fib(" << inputNumber1 << ") = " << fib(inputNumber1) << std::endl;
std::cout << "fib(" << inputNumber2 << ") = " << fib(inputNumber2) << std::endl;
int arr[] = {5, 3, 9, 8, 3};
Expand Down