11i.cpp
来自「C/C++程序设计导论(第二版)》程序源文件」· C++ 代码 · 共 14 行
CPP
14 行
// Capitalize.cpp A program to input a word and output the capitalization#include <iostream>#include <string>#include <ctype.h>using namespace std;void (main){ string word; cout << "enter word to be capitalized: " ; cin >> word; if (islower(word[0])) word[0] = toupper(word[0]); cout << "capitalized word is: " << word << endl;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?