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, 22.06.2019 17:00
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
question
Computers and Technology, 23.06.2019 07:10
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
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
Social Studies, 20.09.2020 17:01
Questions on the website: 13722360