get input as variable cpp code example Example: how to get input from the console in c++ int age; cin >> age;