open_in_new
content_copy
total = 0; k = 1; while (k <= n) { total += k * k * k; k++; }