28 lines
442 B
C++
28 lines
442 B
C++
#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;
|
|
bye();
|
|
}
|
|
|
|
|
|
int main() {
|
|
greet("Adit");
|
|
|
|
return 0;
|
|
} |