Declaring and Defining a variable

Declaring and Defining a variable

Create a program that declares a variable age of type int and assigns it a value. Then, print out a message saying "Hello, I am [age]!"

Answer

#include <iostream>

int main() 
{
    int age = 20;
    std::cout << "Hello, I am " << age << "!";
}
Questions