Quote:
|
Originally Posted by khushal_kkk
how to convert the upper case letter to lower case as if i enter "KHUSHAL"
the output it gives is "khushal" and same as i enter "khushal" it gives "KHUSHAL".please explain it by sending the code but complete code.
|
If your intention is to learn to be a professional programmer, you will need to learn:
- how to use a search engine to find your own answers.
- how to look at problems long enough to see & understand the patterns contained.
...but I will give you a hint: look at an ASCII table. See that the sequences A-Z & a-z always increase:
- 'A' + 1 = 'B'
- 'B' + 1 = 'C'
- ...
...& correspondingly,
- 'a' + 1 = 'b'
- 'b' + 1 = 'c'
- ...
Now try to determine whether there is a relationship between 'A' and 'a'. In other words, determine whether there is a constant which can be added to the ASCII code for 'A' which will produce 'a'. See if this same relationship holds for 'B'.
etc. Once you see a pattern, figure out whether you can write C++ code which will automate the decisions you just made.
One of the biggest skills used in programming is learning how to look at problems inductively.