To convert to uppercase › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2: [Arrays] – Functions, Variable and Scope, Debugging, Arrays, and Command Line Arguments › To convert to uppercase Tagged: scrabble lab problem This topic has 0 replies, 1 voice, and was last updated 3 years, 4 months ago by admin. Viewing 1 post (of 1 total) Author Posts September 15, 2022 at 11:31 am #586 adminKeymaster I intend to convert word to uppercase. It appears mine is not the correct way. Why it is wrong and how to correct. [dm_code_snippet background=”yes” background-mobile=”no” slim=”yes” line-numbers=”yes” bg-color=”#abb8c3″ theme=”dark” language=”clike” wrapped=”yes” height=”” copy-text=”Copy Code” copy-confirmed=”Copied”] int compute_score(string word) { // TODO: Compute and return score for string string wordU = toupper(word); int x = strlen(word); return x; } [/dm_code_snippet] Update: On second thought, since toupper/tolower works on char type (cs50 manual), it will not work on string type. Is there any alternative way to make the same work for string? Or perhaps need to take char one by one and then convert to uppercase. Reply https://edstem.org/us/courses/176/discussion/1778073[learn_press_profile] Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In