C
C#2y ago
TOLOXI

how to print the bigger letter

Im trying to code a program where you type in two names and the name with the bigger first letter gets printed out
11 Replies
x0rld
x0rld2y ago
what do you mean by bigger ?
TOLOXI
TOLOXI2y ago
the letter that comes first in the alphabet
x0rld
x0rld2y ago
you should put all in lowercase first I assume there is an implicit cast to int when you compare chars
TOLOXI
TOLOXI2y ago
what if its uppercase?
mtreit
mtreit2y ago
You can compare characters for greater than / less than
x0rld
x0rld2y ago
x0rld
x0rld2y ago
it will be clearly more complicated if you can't lowercase/uppercase all first
TOLOXI
TOLOXI2y ago
but this code should be able to solve it righ?
TOLOXI
TOLOXI2y ago
if im only using lowercase
x0rld
x0rld2y ago
probably yes
TOLOXI
TOLOXI2y ago
its working thanks for the help