Computer Science, asked by ruhi668, 1 year ago

An employee wants to deposit certain sum of money under "Term Deposit
scheme in Syndicate Bank. The bank has provided the tariff of the scheme,
which is given below:
Rate of Interest
No. of Days
Up to 180 days
181 to 364 days
Rate of Interest
5.5%
7.5%
No. of Days
Exact 365 days
More than 365 days
9.0%
8.5%
Write a java program to calculate the maturity amount taking the sum and number
of days as inputs.​

Answers

Answered by singh0502002
0

Answer:

yeah answer hai do he live andK

Attachments:
Answered by tanyatuli2708
0

Answer:

import java.util.Scanner;

public class KboatTermDeposit

{

   public static void main(String args[]) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter sum of money: ");

       double sum = in.nextDouble();

       System.out.print("Enter number of days: ");

       int days = in.nextInt();

       double interest = 0.0;

       

       if (days <= 180)

           interest = sum * 5.5 / 100.0;

       else if (days <= 364)

           interest = sum * 7.5 / 100.0;

       else if (days == 365)

           interest = sum * 9.0 / 100.0;

       else

           interest = sum * 8.5 / 100.0;

           

       double amt = sum + interest;

       

       System.out.print("Maturity Amount = " + amt);

   }

}

Similar questions