Hello World and Comments
Write a program that has a
comment in it and outputs “Hello World.” on one line and “C++ rocks!” on a new line.
int main()
{
// this is a comment
std::cout << "Hello World." << '\n';
std::cout << "C++ rocks!";
}
Declaration
Write a program that declares three variables inside the main function. Variables are of types char, int, and double. The names of the variables are arbitrary. Since we do not use any input or output, we do not need to ...