#How to find a tie value?

13 messages · Page 1 of 1 (latest)

stray basalt
#

When there is a tie for lowest or greatest baby weight, I need to display a message. This message needs to only be displayed if there is a tie for lowest or a tie for highest.
https://replit.com/@NicholasHamil12/HW-5?v=1

NicholasHamil12

Run C++ code live in your browser. Write and run code in 50+ languages online with Replit, a powerful IDE, compiler, & interpreter.

shadow ivyBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

latent summit
#

use an if

stray basalt
#

how would i find a tie using an if statement though? I'm struggling to find a way where a tie is only found for the lowest input value

latent summit
stray basalt
#

i understand that, but i dont know how to both find the lowest input value and then see if theres a tie with only that lowest value

latent summit
#

i cant use replit

stray basalt
latent summit
#

I think it would be best to have findLowest and findHighest return the the lowest or highest respectively

stray basalt
#

so i would just take the value from that and use an if statement to test if its equal to anything else right?

#

that makes sense

#

thank you