Computer Science, asked by animelover0225, 7 months ago

WAP that asks a user to input prrincipal amount, number of years, and arte of interest This program should display simple interest.

Answers

Answered by anubhav6083
1

Answer:

import java.util.*;

class Interest

{

void main()

{

Scanner sc = new Scanner (System.in);

SOPLN("Enter the principal");

double p = sc.nextDouble();

SOPLN("Enter the time");

double n = sc.nextDouble();

SOPLN("Enter the rate");

double r = sc.nextDouble();

double SI = (p*n*r)/100;

System.out.println("The interest is ₹ "+SI);

}

}

P.S--- SOPLN means System.out.println ok

Similar questions