What is the value of “final” after the following program executed?

Loading

โœช Choose the correct option.

What is the value of “final” after the following program executed?


void main()

{

int sum, index;

index = 0; sum=0; for(;;) {

sum = sum + index;

++index;

if (sum >= 100) break;

}

final = sum/index;

}

A. 91/14
B. 91/13
C. 105/15
D. 105/14

Leave a Comment