bzl.co

Add a thread

java question

Chat Forum Talk about topics not related to MapleStory

TwitterFacebook Replies: 4

Replies

if (acount > bcount && bcount > ccount)
highest = "acount";
else if (bcount > acount && acount > ccount)
highest = "bcount";
else if (ccount > acount && acount > bcount)
highest = "ccount";

these lines of code are wrong.
Change it to
if (acount > bcount && acount > ccount)
highest = "acount";
else if (bcount > acount && bcount > ccount)
highest = "bcount";
else if (ccount > acount && ccount > bcount)
highest = "ccount";

And write something that checks for equals
Jun 20 2013
xoqtprincessxo Level 94 Mardia Dragon Knight
You don't account for one count equaling another count

dumb ghost boy ninja
Jun 20 2013
SpiritBag Level 240 Windia Shadower Corona Guild
acount = 2
bcount = 2
ccount = 3

None of your if statements evaluate to true when two of the counts are equal.
Jun 20 2013

Become a member

Signup or login to join the conversation.