Originally Posted by
scias23
help here again... if i enter AaBbCc the output should be CcBbAa or cCbBaA.. but the output appears cbaCBA.. help!!! heres the code..
if(a[b]<a[c])
If that's the goal, then this line won't work for your purposes. Any lower case letter has a higher ASCII value than an upper case letter. The
< operator uses the ASCII table. You need to use
toupper or
tolower in the line above to convert the digits from upper to lower case or vice versa and handle the comparison.
http://www.cplusplus.com/reference/c...e/toupper.html
http://www.cplusplus.com/reference/c...e/tolower.html