Results 1 to 2 of 2
  1. #1
    fernando is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Problem with zero in my code

    Hi, I wrote a program and now i am having trouble with the number 0.
    What the program does:
    You enter two names and their test scores, then the program comares their highscores and says who has the highest.
    However when i put in 0 for one of the scores it thinks that 0 is higher then 100, why?

    Thanks.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Maybe this has something to do with the way you compared the numbers. If you show us we might be able to offer some advice.

Similar Threads

  1. [SOLVED] Problem with code - inheritence
    By yalla in forum New To Java
    Replies: 1
    Last Post: 03-30-2008, 06:11 AM
  2. What is the answer yo my problem with this code
    By masaka in forum New To Java
    Replies: 4
    Last Post: 03-26-2008, 06:33 AM
  3. Problem with code
    By jvasilj1 in forum New To Java
    Replies: 5
    Last Post: 02-02-2008, 08:34 AM
  4. Problem with code
    By oregon in forum New To Java
    Replies: 3
    Last Post: 08-05-2007, 05:57 PM
  5. Problem with my first code
    By paul in forum New To Java
    Replies: 2
    Last Post: 07-26-2007, 04:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •