476179

contribution

Oct 2nd, 2019
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package lessons;
  2.  
  3. //write pgm to calculate monthly retirement contribution
  4. //calculate a 5%,8%,10% cont of $6000 a month
  5.  
  6. public class Contribution
  7. {
  8.  
  9. public static void main(String[] args)
  10. {
  11. double income = 6000.0, FiveP = .05, EightP = .08, TenP = .1;
  12. double FivePC, EightPC, TenPC;
  13. FivePC = income*FiveP;
  14. EightPC = income*EightP;
  15. TenPC = income*TenP;
  16. System.out.println("monthly pay: $"+income
  17. +"\nFive Percent Contribution of total monthly income: $"+ FivePC
  18. +"\nEight Percent Contribution of total monthly income: $"+ EightPC
  19. +"\nTen Percent Contribution of total monthly income: $"+ TenPC);
  20.  
  21. }
  22.  
  23. }
Add Comment
Please, Sign In to add comment