Computer Science, asked by Ankita0406, 8 months ago

Write a program in Java to input principal amount, rate, and time and display the simple interest.

I need the codings.

Please text if you know the answer.

Answers

Answered by swastikachoudhury7
1

The answer is attached below.

Attachments:
Answered by Anonymous
1

Answer:

import java.io.*;

class interest

{

public static void main()throws IOException

{

DataInputStream in=new DataInputStream(System.in);

double p=0,r=0,t=0,s=0;

System.out.print("Enter Principal amount.....");

p=Double.parseDouble(in.readLine());

System.out.print("Enter Rate of interest.....");

r=Double.parseDouble(in.readLine());

System.out.print("Enter Time.........");

t=Double.parseDouble(in.readLine());

s=p*r*t/100

System.out.print("Simple Interest......"+s);

}

}

Hope it helps you......

Similar questions