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=””>
>