This is supposed to be as the first comment says but it does nothing for some reason. It's a big jumble of ifs but don't judge me for it. I'm working out of a book designed introduce some basic operations and operators in the first few lessons (while and if for now). Apparently this is doable without vectors and other things. I just need help expressing this code with while and if statements.
I got a more primitive version of this to work without the units but it still
starts at 0. If you would like to look I'd gladely post. I know this is long
the if statements are insane. Sorry. I cut litteraly half of the code for
the other units.
Could you clarify the meaning of the question please. Say the inputs are 100 cm followed by 1 m, are these supposed to be treated as equal (which they clearly are) or not?
Yes. I cut out a bit of the code so it could fit and not obstruct the character limit. I input something like that and it doesn't work at all. Really, nothing works. I start the code and it does nothing.
Thanks for the clarification. It just seemed that you could simplify a lot of the if/else testing if the input was converted to some standard units, such as mm.
Then the testing of the smallest and biggest value so far would be much simpler. You might need to have separate fields to store the converted value, which would be used for comparisons, and the original value+units, which you would use for display purposes.