#include <iostream>
#include <string>
int main() {
// Step 1: Include necessary libraries
// Step 2: Define the key-value pair for the cookie
std::string cookieKey = "username";
std::string cookieValue = "john_doe";
// Step 3: Construct the Set-Cookie header
std::cout << "Set-Cookie: " << cookieKey << "=" << cookieValue << "; Path=/; Expires=Wed, 09 Jun 2023 10:18:14 GMT" << std::endl;
// Step 4: Output additional headers and the HTML content
std::cout << "Content-type:text/html\r\n\r\n";
std::cout << "<html>\n";
std::cout << "<head>\n";
std::cout << "<title>Set Cookie Example</title>\n";
std::cout << "</head>\n";
std::cout << "<body>\n";
std::cout << "<h2>Cookie has been set!</h2>\n";
std::cout << "</body>\n";
std::cout << "</html>\n";
return 0;
}