// // Program: capitalize. // // Purpose: test recursive function to convert all characters in // a string to uppercase. // // Input: // a line of text from standard input. // Output: // the same text, converted to uppercase. // to standard output. #include #include #include // Function to convert string to uppercase. // Pre: "s" contains a null-terminated string; n >= 0 and < length of s. // Post: all characters in s at position n through the end of "s" // have been converted to uppercase. // ADD YOUR FUNCTION HERE. // The prototype should be of the form // ?? capitalize(?? s, ?? n); // (Replace "??" with appropriate types.) // Main program. int main(void) { const int N = 200; char line[N]; cout << "Enter a line of text:\n"; cin.getline(line, N); capitalize(line, 0); cout << "In uppercase, that line is:\n"; cout << line << endl; return EXIT_SUCCESS; }