Computer Science, asked by harshitagarwal9031, 8 months ago

1. Using switch case write a menu driven program to calculate the maturity amount of a
bank deposit :-

1. Term Deposit (option 1) :- to accept principal (p). rate of interest (r) and time period
in years (n).Calculate and print the maturity amount (A) receivable using the formula
as follows:
A=P[1+ to
100
2. Recurring deposit (option 2)- to accept monthly instalment (P), rate of interest (r) &
time period (n). Calulate & print the output the maturity amount (A) receivable using
the formula :-
A=P*n+ P* n(n+1) /2*r/100*1/12

Answers

Answered by Anonymous
3

import java.util.Scanner;

public class BankAccount {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

int userChoice;

boolean quit = false;

do {

System.out.print("Your choice, 0 to quit: ");

userChoice = in.nextInt();

if (userChoice == 0)

quit = true;

} while (!quit);

}

}

Similar questions