Write a program that asks for first name, last name, and age, then prints them formatted. Use cin >> for all inputs since you are reading single words and a number. Declare string firstName, lastName; and int age;.
Use cin >> firstName >> lastName >> age; to read all three. Since all use >>, you do not need getline or cin.ignore() here. Print: cout << lastName << ", " << firstName << " is " << age << " years old." << endl; to format as "Smith, John is 25 years old." This practices chaining extractions.