Question: C++ Program 1 ( 4 points ) Write a program that declares two variables: a string firstName and int age. Write a function, called getName,
C++
Program 1 ( 4 points ) 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 persons name and age. Use filename: week15YourNameFunProg1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
