Do while loop
How would I insert the following code, into a do while loop following the below critieria
int contribution=(int) (salary*(limit/100));
int cumulcontribution += contribution;
System.out.println(age +salary +limit +contribution +cumulcontribution);
(A) Compute a cumulative total retirement contribution.
The limit to contributions is determined by the age, as follows:
-- if age is greater than 50, limit is 40%.
-- if age is greater than 40 but less than or equal to 50, limit is 30%.
-- limit is 25 % in all other cases.
( Assume the contributions begin at age 30 and amount equal to the limit is contributed.)
(B) Increment the salary by 3 % every year
(C) Using a product of salary and limit percent, compute the current year's contribution and add to the cumulative total
(D) Check if current age is a multiple of 5, using the modulus (%) operator. If so, print out the current values of: age, salary (truncate fraction or cents.. example: print 38504 if value is 38504.82), limit (%), contribution and cumulative contribution.
}while (age>=30 && age <=60);
if (age > 50)
limit = 40;
else if (age > 40 && age <= 50)