Saturday 26 July 2014

Write a Program that calculates and prints the simple interest using the formula : Simple Interest = PNR/100

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        int p,n,r,Ans;
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter the Value of P : ");
        p = sc.nextInt();
        System.out.println("Enter the Value of N : ");
        n = sc.nextInt();
        System.out.println("Enter the Value of R : ");
        r = sc.nextInt();

        Ans = (p*n*r)/100;
        System.out.println("Interest is : "+Ans);
       
    }

}




OutPut :






0 comments:

Post a Comment

Followers