Hey guys I cant seem to got my computations to work! Any clue and what im doing wrong and also how do I get to display an decimal point? thanks very much
in eclipse it says something like string is undefined or something similar
import java.util.Scanner;
import javax.swing.JOptionPane;
public class converter {
public static final int ONE_PENCE_IN_NEW_PENNIES= 67;
public static final int ONE_SHILLING_IN_NEW_PENNIES= 804;
public static final int ONE_OLD_POUND_IN_NEW_PENNIES= 16080;
public static final int ONE_NEW_POUND_IN_NEW_PENNIES= 100;
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String oldPoundsInput= JOptionPane.showInputDialog("Insert Pounds:");
Scanner oldPoundsScanner= new Scanner(oldPoundsInput);
String oldShillingsInput= JOptionPane.showInputDialog("Insert Shillings:");
Scanner oldShillingsScanner= new Scanner(oldShillingsInput);
String oldPenceInput= JOptionPane.showInputDialog("Insert Pence:");
Scanner oldPenceScanner= new Scanner(oldPenceInput);
int newPounds = ((oldPenceInput)*(ONE_PENCE_IN_NEW_PENNIES)) + ((oldShillingsInput)*(ONE_SHILLING_IN_NEW_PENNIES) ) + ((oldPoundsInput)*(ONE_OLD_POUND_IN_NEW_PENNIES));
JOptionPane.showMessageDialog(null, "The value is:"+newPounds);
}
}