subject
Computers and Technology, 11.02.2021 21:20 Ddom

The following c++ program asks the user to enter two numbers. What is the output of the program if the user enters 12 and 14? #include
using namespace std;

void func1(int&, int&);
void func2(int&, int&, int&);
void func3(int, int, int);

int main()
{

int x = 0, y = 0, z = 10;
cout << x << " " << y << " " << z << endl;

func1 (x, y);
cout << x << " " << y << " " << z << endl;

func2 (x, y, z);
cout << x << " " << y << " " << z << endl;

func3 (x, y, z);
cout << x << " " << y << " " << z << endl;

return 0;
}

void func1 (int &a, int &b)
{
cout << "Enter two numbers: ";
cin >> a >> b;
}

void func2 (int &a, int &b, int &c)
{
b++;
c--;
a = b + c;
}

void func3 (int a, int b, int c)
{
a = b - c;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:00
Which task uses a simple parameter?
Answers: 1
question
Computers and Technology, 25.06.2019 04:50
Your program should prompt the user for the dimensions of the two squares matrices, making sure that the user input is greater than or equal to 4.[ yes, an example would be a4x4matrix]2.if the above is not met, prompt the user for a new value.3.now generate random integernumbers to fill both matrices.4.display these two matrices on the screen.5.multiply the two matrices and display the result on the scre
Answers: 2
question
Computers and Technology, 25.06.2019 07:00
Amisfire code is a type diagnostic trouble code (dtc).
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
In the context of computer operations division is a(n)
Answers: 2
You know the right answer?
The following c++ program asks the user to enter two numbers. What is the output of the program if t...
Questions
question
Mathematics, 05.05.2020 17:37
question
Physics, 05.05.2020 17:37
Questions on the website: 13722361