Objective: Add rest-of-line comments to as many lines of the following program as necessary to fully document the program's logic.
In modern C++, the preferred comment style is the rest-of-line comment using //. Everything after // on a line is treated as a comment and ignored by the compiler. Well-written comments explain why the code does something, not just what it does. In this exercise, you will practice adding helpful // comments to a short C++ program.
//
/* ... */
#include <iostream> int main() { const int moonMiles = 238857; std::cout << "The moon's distance from the Earth is " << moonMiles; std::cout << " miles." << std::endl; int moonKilometers; moonKilometers = static_cast<int>(moonMiles * 1.609); std::cout << "In kilometers, this is " << moonKilometers; std::cout << " km." << std::endl; return 0; }