* binary search c++ * selection sort c++11 * c++ recursive countdown * c++ recursion * c++ quicksort * rename folder names to c++11 * add another version of binary_search function * c++11 hash tables * c++11 breadth-first search
19 lines
260 B
C++
19 lines
260 B
C++
#include <iostream>
|
|
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
void countdown(const int& i) {
|
|
cout << i << endl;
|
|
|
|
// base case
|
|
if (i <= 0) return;\
|
|
|
|
// recursive case
|
|
countdown(i - 1);
|
|
}
|
|
|
|
int main() {
|
|
countdown(5);
|
|
}
|