Capital and lower case letters

Hello!
How can I write program that can convert an input string into a form that only the first letter of the string is a capital letter and the rest is lower-case?
Last edited on
single letter is a char type. Char is simply a 8 bit number (byte).

Each sign have it's code.
'a' is 97, and 'A' is 65.
more here http://www.ascii-code.com/.

so to convert 'a' to 'A'.
1
2
3
4
5
6
char c='a'

if (c == 97)
{
c -= 32;
}


Do you see what you need to do now? :)
Last edited on
I certainly see..
Topic archived. No new replies allowed.