Professional Documents
Culture Documents
Lab 3 Task PDF
Lab 3 Task PDF
Lab activity 1 :
Write a C++ function that should capitalizes the first letter in every word. Assume the first
letter is any letter at the beginning or preceded by a blank. All other letters should be turned
into lowercase. You can use the library toupper and tolower functions. Assume the prototype
is
Example:
String: this is third lab of 102l
Resultant string: This Is Third Lab Of 102L
Lab activity 2 :
Write a C++ program that gets a Roman number in string format from user and converts it
into decimal number. You should write a separate function which converts from Roman
numbers to decimals.
Hint: The roman numbers are written according to: M = 1000, D = 500, C =100, L=50,
X=10, V=5, I=1.
Examples:
87 = LXXXVII
221 = CCXIX
1356 = MCCCLIV
2673 = MMDCLXXIII