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

The farmer graphs a step function to model the situation. Which of the following describes the farmer’s graph for the step that includes 20.75 pounds, and what
Which imperial power had the most colonies spread out across the world in 1900
Why did the creation of ARPANET help with this critical need? Scientists needed a way to work together to share their research and findings. DARPA wanted to
The population of Mexico has been increasing at an annual rate of 1.7% . If the population was 100,350,000 in the year 2000, predict its population in 2015. Rou
Why does the salt iron chloride form?
In "Little Things Are Big," the lady with the children can be described as ___. minor and flat major and static the antagonist dynamic and stereotyped
What is a flashback and flash forward
What is the 8% in fraction
How many calories do you burn when you jump rope 100 times?
How much rainfall does the Central Plateau receive?