#include #include #include using namespace std; const int COUNT = 20; void print(string text) { for (int i = 0; i < COUNT; i++) { // Print a line. for (const char &ch : text) cout << ch; cout << '\n'; } } int main(void) { thread hello_thread(print, "Hello, world!"); thread go_thread(print, "Go Spartans"); hello_thread.join(); go_thread.join(); cout << endl << "Program done." << endl; return 0; }