Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

suming up the total help

 
jayson clark
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21510
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
 
jayson clark
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats FORex types? sorry im very new...
 
Henry Wong
author
Marshal
Pie
Posts: 21510
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
jayson clark
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help...plz i need ur helpp
 
Ricky Martaputra
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey thanks for ur reply..its working now...
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jc:
any help...plz i need ur helpp


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

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15492
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After you have changed your display name, look again at Henry Wong's answer. He points you in the right direction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic