Babygirl1276 Babygirl1276
  • 12-10-2017
  • Business
contestada

Use function getuserinfo to get a user's information. if user enters 20 and holly, sample program output is:

Respuesta :

meerkat18
meerkat18 meerkat18
  • 25-10-2017

#include<iostream>

#include<string>

using namespace std;

void GetUserInfo(int &userAge, string &userName)

{

cout << "Enter your age: " << endl;

cin >> userAge;

cout << "Enter your name: " << endl;

cin >> userName;

return;

}

int main() {

int userAge = 0;

string userName = "";

/* Your solution goes here */

GetUserInfo(userAge, userName);

cout << userName << " is " << userAge << " years old." << endl;

return 0;

}

Answer Link

Otras preguntas

A loan of $900 will be repaid in 36 installment payments of $30.22 each. What the finance charge for the loan?
which emperor wanted to return rome to its former glory
what is the tangent of 210 degrees?
What impact did the Reformation have on the religious geography of the Americas?
The percent of fat calories that a person in America consumes each day is normally distributed with a mean of about 36 and a standard deviation of about 10. Sup
Find the LCM of the set of polynomials.4m^3p, 9mp^4, 18m^4p^2
When environmental conditions are favorable, ________ is generally more beneficial for a fungal species. a. asexual reproduction b. sexual reproduction c. moving
List three pollutants the burning of fossil fuels adds to air. What are the sources of these three pollutants?
Not sure how to solve 2sinxcosx+cosx=0  Could you help?
Not sure how to solve 2sinxcosx+cosx=0  Could you help?