First Program ยป Exercises
Lord Mux from the Planet Multiplexer has landed on Earth! It was quite a disasterous arrival - portal storms, rabid alien creatures, electromagnetic pulses, and more have shuttered the global infrastructure. Despite this, Mux demands to see humanity's most advanced technology. While all silicon-based computers have become inoperable from the radiation surges, the old mechanical teletypes from the 30s are still fully functional.
Write a C++ program that uses std::cout
to send a message to Lord Mux. Our engineers have wired up the output stream to be connected
to one of the last remaining telegraph lines in the downtown area.
Your message should look like this:
Hello Lord Mux!
I am "YOUR NAME", a representative for the Planet Earth and all of Humanity.
I have been sent to you to demonstrate our most advanced technology.
Sadly, your unexpected arrival has destroyed our computing and manufacturing abilities.
I bring to you an old "teletype" made nearly 100 years ago. It is printing the message you are reading now.
It can even do math! Look: (42 - 37) * (42 + 37) = 395
Give us some time, we can make something even cooler!
(Note: don't hard code the answer to the math equation, you should use what you learned above!)