CPPForSchool.com: String Set 1 Assignment 10

10. Write a program to convert a string in uppercase.

This assignment was not too difficult.  It became very obvious that I just had to modify Assignment 9 to an uppercase algorithm.  Instead of the algorithm checking for uppercase characters, I changed it to lowercase characters and subtracted 32 instead of adding.  Nevertheless, this was a good learning experience because I am now able to convert strings without using islower, isupper, tolower, or toupper.  Granted, I am not sure how truly impactful it will be to the performance, but it is nice to know that I have options.

Below is my source code and output.  Also, I have included the sample source and output.









Comments

Popular posts from this blog

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 9

CPPForSchool.com: Array - Single Dimension Set 1 Assignment 6

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 8