File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes suming up the total help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "suming up the total help" Watch "suming up the total help" New topic
Author

suming up the total help

jayson clark
Greenhorn

Joined: Mar 14, 2005
Posts: 14
hello guys i foillwed ur instructions but im not getting the right output still..



i did this codes and whnever i tried to run it its just asking me the options and not totalling the savings...

what am i doing wrong?

plz help
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18757
    
  40



You ask the user to "enter the number of Euros", but where do you actually get the number? I am assuming that it is supposed to be stored in the euro variable. Same question applies to the other ForEx types.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
jayson clark
Greenhorn

Joined: Mar 14, 2005
Posts: 14
whats FORex types? sorry im very new...
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18757
    
  40

Originally posted by jc:
whats FORex types? sorry im very new...


Sorry, accidental terminoloy slippage. ForEx is short for Foreign Exchange -- the dollar, the euro, the yen, etc.

Basically, you ask the user to enter the number, but nowhere do you actually get it from the user.

Henry
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
I'm not sure why you didn't continue in the original thread. I also don't understand why you changed your display name from an acceptable "firstName, space, lastName" to the unacceptable "jc". Please read the JavaRanch Name Policy and changed your display name again.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
jayson clark
Greenhorn

Joined: Mar 14, 2005
Posts: 14
any help...plz i need ur helpp
Ricky Martaputra
Ranch Hand

Joined: Apr 04, 2005
Posts: 42
hi jc,
first, you must put your scanner to read the input of each currency's block.

example:


then, do not put in the while loop

because it would not be read since your while condition inputNumber != 4

to check the value of savings, put System.out.println( savings ) after the while loop.

regards,
Ricky
jayson clark
Greenhorn

Joined: Mar 14, 2005
Posts: 14
hey thanks for ur reply..its working now...
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Originally posted by jc:
any help...plz i need ur helpp


Yes, read what Marilyn posted about following our naming policy.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Originally posted by jc:
any help...plz i need ur helpp


Yes, read what Marilyn posted about following our naming policy.

Mark
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

After you have changed your display name, look again at Henry Wong's answer. He points you in the right direction.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: suming up the total help