Question: In C++ Write a program that declares two variables: a string firstName and int age. Write a function, called getName, that when called, prompts the
In C++
Write a program that declares two variables: a string firstName and int age. Write a function, called getName, that when called, prompts the user for their first name. The function should return the first name and store it in the firstName variable. Write a function, called getAge, that when called, prompts the user for their age. The function should return the age and store it in the age variable. Write a function, that uses the firstName and age as arguments. In the function, print out the person's name and age
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
