Assume an int variable named n has been declared and assigned a positive value.also assume the int variables k and total have also been declared but have not been assigned values.write code that uses a for loop that calculates the sum of the cubes of the numbers 1 through n and stores this value in total. use no variables other than n, k, and total.