Printing out numbers onto the console
Hi I'm doing a exercise which requires a user interface. I have coded prompts for the user e.g.
Please Enter Amount (type double)
Please Enter Agreed Interest Rate (type double)
What seems to be happening is:
1) When I enter an amount (type double) a different amount will printout onto the console screen e.g
I enter 8.0
Console screen prints out 56.0 ????
2) After I enter the one amount the console will not allow me to enter the amounts for the other options ???
I am using Eclipse Gallello (sorry for spelling)
public class Comp_Interest_Calc_tut
public static void main(String args)
* Variables have already been declared*
Years_In = (double)System.in.read();
System.out.println("Enter Agreed Interest Rate");
InterestRate_PA = (double)System.in.read();
Last Post: 04-28-2008, 01:26 PM
Last Post: 10-02-2006, 01:22 PM
By kanakatam in forum Java
Last Post: 05-31-2006, 03:14 AM
By sensei in forum VB Classic
Last Post: 05-18-2006, 02:25 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL