forked from michiganhackers/osd-onboarding-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.cpp
81 lines (78 loc) · 3.17 KB
/
welcome.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "sort.h"
#include <iostream>
int fib(int n) {
if (n == 0 || n == 1) {
return n + 1;
}
return fib(n - 2) + fib(n - 1);
}
int main(int argc, char *argv[]) {
std::cout << " \
....... ...... \n\
`kKXXXX0: cKXXXXKx. \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMX: .... \n\
:NMMMMMM0l:::::,,,:kK00Okxo:````. \n\
...``l0K0Okxxdolc:::,``.... \n\
..``...... \n\
....``,::clll:````. \n\
....`,:::clol:,::ccclokXWWMMMMX: \n\
.`````oXWWMMMWx. .kMMMMMMK, \n\
:XMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK: \n\
:NMMMMMWo .xMMMMMMK, \n\
:NMMMMMWo .xMMMMMMK: \n\
:XMMMMMWl .dWMMMMMK, \n\
.:lllll:. .cllllc, \n"
<< "\n";
std::cout << "Hello from Michigan Hackers!\n"
<< "Learn more: https://www.youtube.com/watch?v=dQw4w9WgXcQ\n";
std::cout << "Doing some math...\n";
// Why is this so slow...
// TODO: make it go faster
std::cout << "Input your first favorite number: \n";
int inputNumber1, inputNumber2;
std::cin >> inputNumber1;
while (inputNumber1 > 25) {
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) {
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};
// Why is it printing weird things...
std::cout << "Sorting " << arr << "...\n";
my_sort(arr, 5);
std::cout << "Sorted: " << arr << "\n";
// Please delete the line below
std::cout << "Enjoy this whale\n";
std::cout << R"( .
":"
___:____ |"\/"|
,' `. \ /
| O \___/ |
~^~^~^~^~^~^~^~^~^~^~^~^~
)" << '\n';
std::cout << "Hello, this is Leon!\n";
my_sort(arr, 7);
std::cout << "Sorted: " << arr << "\n";
}