**Question 4 : Write a program in Java to calculate Simple Interest (Principal, Rate, & Time to be given by the user).**

**Java Program :**

class simple_interest

{

public static void main(int p,int r,int t)

{

int si;

si=(p*r*t)/100;

System.out.print("The Simple interest on Rs. "+p+" for "+t+" year/s at "+r+"% rate of interest = Rs. "+si);

}

}

p=100

r=10

t=1

The Simple interest on Rs. 100 for 1 years at 10% rate of interest = Rs. 10

**Input :**

p=100

r=10

t=1

**Output :**

The Simple interest on Rs. 100 for 1 years at 10% rate of interest = Rs. 10

java programs showing on net is very much helpful for us,the students

ReplyDeleteBetter programme! You can try it in the computer.

ReplyDeleteIt's really helpful

ReplyDelete