Computer Science, asked by Anonymous, 7 months ago

write a program in Java to accept the principal rate and time . Calculate and display the interest accumulated for the first year, second year and third year compounded annually .
Please do help its urgent​

Answers

Answered by manuprajapati519
1

import java.util.Scanner;

public class interest

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

int p, r, t, i1, i2, i3;

System.out.println("Input rate and principal");

r=in.nextInt();

p=in.nextInt();

i1=p*r*1/100;

System.out.println("Interest of 1st year ="+i1);

i2=p*r*2/100;

System.out.println("Interest of 2nd year ="+i2);

i3=p*r*3/100;

System.out.println("Interest of 3rd year ="+i3);

}

}

Answered by sidneet60
1

I am also on Wattpad

Explanation:

what is your profile name in Wattpad? please tell me

Mine is @ruhi1121

you can pm me on Wattpad

Similar questions