Logical order of execution

In the following program, number the marked statements to show the order in which they will execute (the logical order of execution).  Also what is the output if the input is 10? (6, 7, 8)

#include

using namespace std;

int secret(int, int);

void func(int x, int& y);

int main()

        int num1, num2;

_____   num1 = 6;

_____   cout < “enter=”” a=”” positive=”” integer:=””>

 _____   cin >> num2;

_____   cout < endl;=””>

_____   cout < secret(num1,=”” num2)=””>< endl;=””>

_____   num2 = num2 – num1;

 _____   cout < num1=””>< “=”” “=””>< num2=””>< endl;=””>

_____   func(num2, num1);

_____   cout < num1=””>< “=”” “=””>< num2=””><>

_____   return 0;  

   int secret(int a, int b)  

        int d;

_____   d = a + b;

_____   b = a * d;

_____   return b;  

   void func (int x, int& y)  

         int val1, val2;

_____   val1 = x + y;

_____   val2 = x * y;

_____   y = val1 + val2;

_____   cout < val1=””>< “=”” “=””>< val2=””>< endl;  =””>

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X