‘Bank of India’ announces new rates for term deposit schemes for their customers and
Senior Citizens as given below:
Term Rate of Interest
(General)
Rate of Interest
(Senior Citizen)
Up to 1 year 7.5% 8.0%
Up to 2 years 8.5% 9.0%
Up tp 3 years 9.5% 10.0%
More than 3 years 10.0% 11.0%
The ‘senior citizen’ tag is applicable to the customers whose age is 60 years or more.
Write a program to accept the sum (p) in term deposit scheme, age of the customer
and the term. The program displays the information in the given format:
Amount Deposited Term Age Interest
earned Amount Paid
xxxx xxxx xx xxxx xxxx
Answers
Answer:
i gave you answer but very first add me as a brain list
Answer:
here is your answer
Explanation:
import java.util.Scanner;
public class bank
{
public static void main()
{
Scanner sc=new Scanner(System.in);
double sum,i;
int term,age;
System.out.println("Enter amount deposited");
sum=sc.nextFloat();
System.out.println("Enter term period in years");
term=sc.nextInt();
System.out.println("Enter your age");
age=sc.nextInt();
if(age<60)
{
if(term<=1)
{
i=(term*sum*7.5)/100;
}
else if(term<=2)
{
i=(term*sum*8.5)/100;
}
else if(term<=3)
{
i=(term*sum*9.5)/100;
}
else
{
i=(term*sum*10.0)/100;
}
}
else
{
if(term<=1)
{
i=(term*sum*8.0)/100;
}
else if(term<=2)
{
i=(term*sum*9.0)/100;
}
else if(term<=3)
{
i=(term*sum*10.0)/100;
}
else
{
i=(term*sum*11.0)/100;
}
}
System.out.println("Amount Deposited Interest earned Amount paid Term Age");
System.out.println(" "+sum+" "+i+" "+(i+sum)+" "+term+" "+age);
}
}