add c++11 (#87)
* 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
This commit is contained in:
27
03_recursion/c++11/02_greet.cpp
Normal file
27
03_recursion/c++11/02_greet.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
void greet2(std::string name) {
|
||||
cout << "How are you, " + name + "?" << endl;
|
||||
}
|
||||
|
||||
void bye() {
|
||||
cout << "Ok, bye!" << endl;
|
||||
}
|
||||
|
||||
|
||||
void greet(std::string name) {
|
||||
cout << "Hello, " + name + "!" << endl;
|
||||
greet2(name);
|
||||
cout << "Getting ready to say bye..." << endl;
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
greet("Adit");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user