Purpose of the program is to toggle the case of a letter. If input character is
ID: 3530927 • Letter: P
Question
Purpose of the program is to toggle the case of a letter. If input character is lower case letter, the program should display the letter in uppercase letter. Conversely, and vise versa. If input is not a letter, the program will display the same character without modification. Program should: Welcome the user to your tOGGLE cASE program. This welcome should appear only once regardless of how many letters the user inputs to toggle its case. Ask the user to enter a single letter. If the user types in a letter that is upper case, display the corresponding lower case letter on the screen in appropriately formatted informative output. Similarly if the user types in a letter that is lower case, display the corresponding upper case letter on the screen in appropriately formatted informative output. If the user enters a character that is not a letter, then echo the character entered and inform the user that it is not a letter. Ask the user if he or she has another letter to convert. An answer of Y or y would loop the program back to step 2. Any other answer should cause your program to thank the user for tOGGLing and stop. Notes: Your program should use only explicit static type casting because it is considered to be good style. Only use library , and you may not use any library functions except cin, cout, and static_cast<...>. Your program should make use of the logical operators denoted by the symbols &&, || and ! as appropriate. Include comments for any parts of the code that is non-intuitive to let us know what that portion does. Use meaningful variable names of the appropriate types. i.e. x is not a good name, but InputLetter is. Test your program with a variety of input values to make sure that it changes the case of any letters the user types in and loops when it should.Explanation / Answer
c program to convert upper case letter to lower case letter without using library function.......#include#includevoid main() { char ch; clrscr(); printf("Enter a Character"); scanf("%c",&ch); if(ch>=65 && chRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.