converting uppercase to lowercase in C.. (challenging one) -
I have received this code. Now challenging part my professor asked me to create a program that would allow the user to input The uppercase word
The problem is that, the program wants to automatically change every input letter in uppercase, even if the user's keyboard is not in caps lock mode. Do not know that in my program really What is wrong not ... anyone ?? help?? I really need it .. thanks ..
# include & lt; Stdio.h & gt; # Include & lt; Ctype.h & gt; #to & lt include, string.h & gt; Typingface four string [100]; Main () {Four answers; Int l, x = 0, asc = 13; String s, word 1; Clrscr (); Do {printf ("\ n1 topmost word:"); Do {0 [= 0] = see (); Word 1 [x ++] = s [0]; Strupr (s); Dome (S, "\ 0"); Put (s); } While (s [0]! = (Four) asc); Dome (word1, "\ 0"); Printf ("word \ n \ n 1 word in lowercase:"); For (L = 0; L & LT; Stellen (Word1); L ++) Eucalyptus (Tollar (Word 1 [L])); Printf ("\ nDo you want to continue [Y / N]:"); Resp = getche (); } While (Tupper == 'Y'); Getch (); Return 0; }
- obtain a letter with the user
getch ()
- Change it to uppercase with
toupper ()
-
putch ()
Display with - 1
You can add a break point --- Check if the character is the return key and exit.
Comments
Post a Comment