Welcome to Westonci.ca, the place where your questions are answered by a community of knowledgeable contributors. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

Define a function OutputValues() that takes two integer parameters and outputs all integers between the first and the second parameter, inclusive (each followed by a newline). The function should not return any value.

Ex: OutputValues(2, 4) outputs

2
3
4

#include
#include
using namespace std;

//Type function OutputValues here

int main() {
int num1;
int num2;

cin >> num1 >> num2;
OutputValues(num1, num2);

return 0;
}


Sagot :

Answer:

#include <iostream>

using namespace std;

void OutputValues(int n1, int n2) {

 for (int i = n1; i <= n2; i++) {

   cout << i << endl;

 }

}

int main() {

 int num1;

 int num2;

 cin >> num1 >> num2;

 OutputValues(num1, num2);

 return 0;

}

Explanation:

In this exercise we have to use the knowledge in computational language in C++ to describe a code that best suits, so we have:

The code can be found in the attached image.

To make it simpler we can write this code as:

#include <iostream>

using namespace std;

void OutputValues(int n1, int n2) {

for (int i = n1; i <= n2; i++) {

  cout << i << endl;

}

}

int main() {

int num1;

int num2;

cin >> num1 >> num2;

OutputValues(num1, num2);

return 0;

}

See more about C++ at brainly.com/question/19705654

View image lhmarianateixeira
We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. We appreciate your visit. Our platform is always here to offer accurate and reliable answers. Return anytime. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.