CODING:
import javax.swing.JOptionPane;
class Interest
{
public static void main(String[] args)
{
String p=JOptionPane.showInputDialog(null, "Principle($)", "Simple Interest...", JOptionPane.QUESTION_MESSAGE);
String r=JOptionPane.showInputDialog(null, "RATE(%)", "Simple Interest", JOptionPane.QUESTION_MESSAGE);
String n=JOptionPane.showInputDialog(null, "TIME(Year)", "Simple Interest", JOptionPane.QUESTION_MESSAGE);
int si=Integer.parseInt(p) * Integer.parseInt(r) * Integer.parseInt(n);
si=si/100;
JOptionPane.showMessageDialog(null, "Interest:" + si);
System.exit(0);
}
}
class Interest
{
public static void main(String[] args)
{
String p=JOptionPane.showInputDialog(null, "Principle($)", "Simple Interest...", JOptionPane.QUESTION_MESSAGE);
String r=JOptionPane.showInputDialog(null, "RATE(%)", "Simple Interest", JOptionPane.QUESTION_MESSAGE);
String n=JOptionPane.showInputDialog(null, "TIME(Year)", "Simple Interest", JOptionPane.QUESTION_MESSAGE);
int si=Integer.parseInt(p) * Integer.parseInt(r) * Integer.parseInt(n);
si=si/100;
JOptionPane.showMessageDialog(null, "Interest:" + si);
System.exit(0);
}
}
Comments
Post a Comment