I am pretty sure that the answer for this is n^3, because the 3rd for loop is executed n times and the middle is executed n+4 times and the top one is executed n times. I understand how to use sigma notation for the bottom and top for loop because is uses n, but what do I do different for the middle one because it uses j instead of n
for (int j = 4; j < n; ++j) {
cin >> val; }
for (int i = 0; i < j; ++i) {
b = b * val;}
for (int k = 0; k < n; ++k)
c = b + c;}
}