Hi,
In my view there are 5 assignments:
1. i=4
2. i++
3. j=i-3
4. sum = a[i-4]
5. j++
6. sum +=a[j];
Can somebody please tell me what are the two other assignments?
Zulfi.
Code:
for (i=4; i<n; i++) {
for(j=i-3, sum = a[i-4]; j<= i; j++)
sum +=a[j];
System.out.println("sum for sub array "+(i-4) + "through " +i+ "is" + sum);
}
1. i=4
2. i++
3. j=i-3
4. sum = a[i-4]
5. j++
6. sum +=a[j];
Can somebody please tell me what are the two other assignments?
Zulfi.