Answer:
Following are the statement:-
total = 0, k=0 ; // variable declaration
do
{
total= total+Math.pow(k,3) ; //perform the operation
k++ ;
}while(k<=n);
Explanation:
Following are the description of statement:-
- In this we declare a variable total that is initialized with the 0 value.
- The do while loop is executed at least one time either condition True or False.
- We Iterating the do while loop until k is less than equal to n. In each iteration we calculate sum of the cube of n whole number.