CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   Java and 0 (http://www.codingforums.com/showthread.php?t=40106)

JAVAEOC 06-10-2004 08:01 PM

Java and 0
 
I wrote a programm and now i am having truble with the number 0....

What the programm does:
You enter two names and their test scores, then the programm 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...

the zip: http://free.networkthai.net/x/someone/Student.zip

Spookster 06-10-2004 10:29 PM

Are you converting the numbers to integers or floats before you compare them? If not then you are likely comparing the ascii values of the characters 0 and 100 and not actually the value 0 and 100.

JAVAEOC 06-10-2004 10:55 PM

Yes they are int... So what is wrong? did u look at my script?

thanks


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.