SHARE
TWEET

Untitled

a guest Oct 14th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int question01(float initialLevelOfDebt, int interestPercentage, int repaymentPercentage){
  2.   float counter = 0, deposit = initialLevelOfDebt * 0.1, interestRate, repayment;
  3.   repayment = initialLevelOfDebt * repaymentPercentage * 0.01;
  4.   interestRate = interestPercentage * 0.01;
  5.   while(initialLevelOfDebt > repayment){
  6.     initialLevelOfDebt -= repayment - interestRate * initialLevelOfDebt;
  7.     counter++;
  8.   }
  9.   return round(deposit + counter * repayment + initialLevelOfDebt);
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top