import javax.swing.JOptionPane;
public class Tut3{
	public static void main(String args[]){
	String inputstring;
	int account_number;
	int balance;
	int charges;
	int credits;
	int credit_limit;
	inputstring=JOptionPane.showInputDialog("Enter Account Number:");
	account_number=Integer.parseInt(inputstring);

	inputstring=JOptionPane.showInputDialog("Enter Balance:");
	balance=Integer.parseInt(inputstring);

	inputstring=JOptionPane.showInputDialog("Enter Charges:");
	charges=Integer.parseInt(inputstring);

	inputstring=JOptionPane.showInputDialog("Enter Credits:");
	credits=Integer.parseInt(inputstring);

	inputstring=JOptionPane.showInputDialog("Enter Credit Limit:");
	credit_limit=Integer.parseInt(inputstring);

	balance=balance+charges-credits;
	if (balance>credit_limit) {
		JOptionPane.showMessageDialog(null,"New balance is  " + balance,"Your credit exceed",JOptionPane.PLAIN_MESSAGE);
	}
	else {
		JOptionPane.showMessageDialog(null,"New balance is " + balance,"Credit Report", JOptionPane.PLAIN_MESSAGE);
	}
	System.exit(0);
		}
	}