This week's book giveaway is in the Testing forum.We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

# I know its Friday night, hope somebody's here!

Ryan Newcombe
Greenhorn
Posts: 24
I have a problem with my second case in this program, my totals are all 32. How can I solve this!?

[ October 04, 2002: Message edited by: Marilyn de Queiroz ]

Barry Gaunt
Ranch Hand
Posts: 7729
Have I seen this before?
Like over here?

Ryan Newcombe
Greenhorn
Posts: 24
Close, but not the same---still does not help with my problem.
I'm sure we have the same class together but I don't know the person.
A little help would be appreciated.

Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
Why are you guys initializing your numeric constants to single chars?
totalotPay = 0;
totalRegPay = 0;
totalGrossPay = 0;
counter = 0;

Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
By the way, I just wanted to add that you two guys are asking your questions in exactly the correct way. Show us that you are trying to do the work and we will be more than happy to give you a guiding hand.

Barry Gaunt
Ranch Hand
Posts: 7729
That's why I referred you to over at the other
question. He initialized to '0' and got 48 which
is the value of the char '0'.
You are getting 32 which is the code for ' ', a blank.
-Barry

Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
And you are re-initializing your counter to ' ' everytime you start the "I" case. Try getting rid of the counter=' ' from the start of the case.

Ryan Newcombe
Greenhorn
Posts: 24
Thank You for your help guys. I did what you said and it worked for the transaction total but the regular pay, gross pay, and ot pay are not adding up. any suggestions?

Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
It looks like you aren't adding anything to them.

Barry Gaunt
Ranch Hand
Posts: 7729
The program ends in midair too. Or at least seems like it.
I would be interested to see the assignment as defined by the instructor. Can you post it somehow?
And I would like to see the instructor's solution when the assigment is over.
[ October 05, 2002: Message edited by: Barry Gaunt ]