Given a string, return the string with the first half and the second half doubled. For example, Java becomes JaJavava and Hello becomes HelHellolo. If the length is odd, like Hello, consider the middle character as part of the first half.

Complete the following file:

prog.cpp

#include <iostream> #include <string> using namespace std; string duplicateHalves(string s) {
}