#include <iostream>
#include <string>
// Function to print the envelope with the messages inside
void printEnvelope(const std::string& message1, const std::string& message2) {
int width = 40; // Envelope width
int height = 12; // Envelope height
// Draw the top of the envelope
for (int i = 0; i < width; i++) {
std::cout << "-";
}
std::cout << std::endl;
// Draw the sides of the envelope with space in between
for (int i = 0; i < height - 4; i++) {
std::cout << "|";
for (int j = 0; j < width - 2; j++) {
std::cout << " ";
}
std::cout << "|" << std::endl;
}
// Draw the first message inside the envelope
std::cout << "|";
int padding1 = (width - 2 - message1.length()) / 2;
for (int i = 0; i < padding1; i++) {
std::cout << " ";
}
std::cout << message1;
for (int i = 0; i < (width - 2 - message1.length()) - padding1; i++) {
std::cout << " ";
}
std::cout << "|" << std::endl;
// Draw the second message inside the envelope
std::cout << "|";
int padding2 = (width - 2 - message2.length()) / 2;
for (int i = 0; i < padding2; i++) {
std::cout << " ";
}
std::cout << message2;
for (int i = 0; i < (width - 2 - message2.length()) - padding2; i++) {
std::cout << " ";
}
std::cout << "|" << std::endl;
// Draw the bottom of the envelope
for (int i = 0; i < width; i++) {
std::cout << "-";
}
std::cout << std::endl;
}
int main() {
// Define the two messages
std::string message1 = "I miss you Batouty";
std::string message2 = "Love you Habeeby";
// Call the function to print the envelope with the messages
printEnvelope(message1, message2);
return 0;
}