define a function getlength() that takes two parameters passed by reference. the function reads two integers from input as kilometers and meters in this order. the function does not return any value. ex: if the input is 25 800, then the output is: 25 kilometers and 800 meters

Respuesta :

A getlength() function that accepts two reference-passed parameters.

#include<iostream>

using namespace std;

void GetLength(int &usrFeet,int &usrInches)

{

   cin>>usrFeet>>usrInches;

}

int main()

{

   int usrFeet;

   int usrInches;

   GetLength(usrFeet,usrInches);

   cout<<usrFeet<<" feet and "<<usrInches<<" inches" <<endl;

   return 0;

}

What is a parameter?

The values that are passed to a function are designated by parameters. Three parameters might be required for a function, for instance, to add three numbers. There is a name for a function, and other places in a program can call it. A discussion is what results from that information being passed. Functions can typically have a number of parameters in today's programming languages.

Every function parameter has a type, an identifier, and a comma to indicate the break between each parameter and the next. A function's arguments are passed in via the parameters. Every parameter that a function receives when it is called by a program is a variable. The value of each of the resulting arguments is copied into its corresponding parameter in a process call pass by value.

Learn more about parameters

https://brainly.com/question/29555936

#SPJ4