Midland Bank the following rates of interest for the fixed deposits made by customer time after 6 months rate of interest 7% .time above 6 months and up to 36 months rate of interest 9% .36 months 10% . the amount after months is calculated by using formula: A=p *(1+r/100) . using switch case write a menu driven program to allow customer to deposit the sum for a period on time
Answers
Answered by
7
import java.io
class Interest
{
public static void main(String args[])throws IO Exception
{
int t = Integer.passeInt(in.readLive());
switch (t)
{
case1:
if (t<6)
double r1=7.0;
break;
case2:
if(t>6&&t<=36)
double r2=9.0;
break;
case3:
if(t>=36)
double r3=10.0;
brake;
}
int p= Integer.passeInt(in.readLive());
int a=p*(1+c/100);
System.out.println("amount="+a);
}
}
I hope it is correct I am not sure
class Interest
{
public static void main(String args[])throws IO Exception
{
int t = Integer.passeInt(in.readLive());
switch (t)
{
case1:
if (t<6)
double r1=7.0;
break;
case2:
if(t>6&&t<=36)
double r2=9.0;
break;
case3:
if(t>=36)
double r3=10.0;
brake;
}
int p= Integer.passeInt(in.readLive());
int a=p*(1+c/100);
System.out.println("amount="+a);
}
}
I hope it is correct I am not sure
raghavendra98:
It's a Java programming
Answered by
1
Answer:
hope it helps , actually pic is half
Attachments:
Similar questions
Environmental Sciences,
7 months ago
Social Sciences,
7 months ago
Sociology,
7 months ago
Science,
1 year ago
Math,
1 year ago