Someone Please Help Me!
Dec 11, 2014 at 7:23am UTC
What's wrong with my code? I'm not allowed to use the && operator on this!
1 2 3 4 5 6 7 8 9
if (firstNumber > secondNumber)
if (firstNumber > thirdNumber)
txtLargest->Text = firstNumber.ToString();
else if (secondNumber > firstNumber)
if (secondNumber > thirdNumber)
txtLargest->Text = secondNumber.ToString();
else if (thirdNumber > firstNumber)
if (thirdNumber > secondNumber)
txtLargest->Text = thirdNumber.ToString();
Dec 11, 2014 at 8:42am UTC
bump
Dec 11, 2014 at 9:16am UTC
bump
Dec 11, 2014 at 12:24pm UTC
1 2 3 4 5 6 7
std::string text_largest( int first, int second, int third )
{
int largest = first ;
if ( largest < second ) largest = second ;
if ( largest < third ) largest = third ;
return std::to_string(largest) ;
}
Dec 11, 2014 at 8:59pm UTC
Your logic is genius. Really appreciate the help!
Last edited on Dec 11, 2014 at 8:59pm UTC
Topic archived. No new replies allowed.