Java programs To find recurring deposits and term deposits

Java program for banking reasons . To find recurring deposits and term deposits



import java.util.*;
 public class MAturity_funds
{
    public static void main (String args[])
    { int p,r;int t;
        Scanner in = new Scanner (System.in);
        int n;double term,recurring; int n1;
        System.out.println("Enter 1 for term deposits ");
        System.out.println("ENter 2 for recurring deposits");
        System.out.println("Enter your choice");
        n=in.nextInt();
          switch(n)
        {
            case 1:
            System.out.println("Enter principle");
             p=in.nextInt();
            System.out.println("Enter the rate of interest");
            r=in.nextInt();
            System.out.println("Enter the time period");
        t=in.nextInt();
            term=p*Math.pow(1+r/100,n);
            System.out.println("Amount recieved="+term);
            break;
            case 2:
            System.out.println("Enter the monthly installment");
        p=in.nextInt();
            System.out.println("Enter the rate of interest");
           r=in.nextInt();
            System.out.println("Enter the time period");
        t=in.nextInt();
            recurring=p*r*t+(p*t*(t+1))/2*r/100*12/100;
            System.out.println("Recurring"+recurring);
            break;
            default :
            System.out.println("WRong choice");
        }
    }}
            

Comments

Popular posts from this blog

Practice questions for English grammar

Physics 2017 Solved Paper Physics

Computer applications icse board exam paper solved 2017