Simple interest program for JAVA

class SimpleInterest

{
public static void main(String args[])
{
float principle, no_of_years, rate_of_interest, simple_interest;
principle = 10000;
no_of_years= 6;
rate_of_interest = 8.5F;
simple_interest = principle * no_of_years * rate_of_interest ;
simple_interest = simple_interest / 100 ;
System.out.println(“\n Simple Interest on a principle of “+principle+” is “+simple_interest+” at the rate of “+rate_of_interest+” for a period of “+no_of_years);

}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s