Program segment

What is the output of the following program segment?  (4) 

long long num = 5;

int i;

for (i = 1;

i < 3;=”” i11)=””>

    num = num + num * (num – i);

    cout < num=””>< “=”” “;=””>

 cout <>

What is the output of the following program segment?  (4) 

int num = 0, count;

int y = 0;

for (count = 1; count <= 5;=”” 11count)=””>

    y = y + count;

    num = num * count + y;

 cout

“num=” << num << ” ,=”” y=””>

>

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