I am trying to write a simple currency conversion program that converts a US dollar to a Euro,pound,and peso. For the life of me I cannot get the US dollar Amount to multiply to a pound(or anything else for that matter.
HELP!!!
Code:
import java.util.Scanner;
public class CurrencyConverter
{
public static void main (String[]args)
{
Scanner console = new Scanner (System.in);
int dollar;
boolean poundAnswer;
double number;
double pound;
//double poundAnswer;
dollar = 1;
pound = .65;
poundAnswer = (pound*dollar);
System.out.println (" Please enter a United States Dollar amount to be converted.");
poundanswer= console.nextboolean();
if (true)
{
System.out.println (" The dollar equivalent of "+dollar+" is equal to:");
System.out.println( + poundAnswer + "pounds");
}//end dollar
}//end main
}//end Public Class.
Last edited by a moderator: