All pastes #376010 Raw Edit

Something

public java v1 · immutable
#376010 ·published 2007-02-28 19:59 UTC
rendered paste body
mport javax.swing.JOptionPane;public class tipcalculator{   /** 	* This program is for calculating a tip from a set amount 	* Written by Brandon Scott 	* on 1/31/07 	* 	*/ 	 	public static void main(String[] args) 	{  		String billString; 		 	 			billString = JOptionPane.showInputDialog(null, 			"Enter Bill Amount: ", 			"bill Input (int)", 			JOptionPane.QUESTION_MESSAGE);	 					 		double billDouble = Double.parseDouble(billString); 		 		String gratString; 		 	 			gratString = JOptionPane.showInputDialog(null, 			"Enter Gratuity Amount: ", 			"grat Input (int)", 			JOptionPane.QUESTION_MESSAGE);	 				 		double gratDouble = Double.parseDouble(gratString); 		 				 		double percDouble = (gratDouble/100); 		 		 		double total = (billDouble) + (percDouble); 		 		JOptionPane.showMessageDialog(null, 			"The Gratuity Rate is:" + percDouble , 			"perc Output", 			1);	 					 		JOptionPane.showMessageDialog(null, 			"Your Bill is:" + total , 			"total Output", 			1);		}}