9iii.cpp
来自「C/C++程序设计导论(第二版)》程序源文件」· C++ 代码 · 共 16 行
CPP
16 行
// compare.cpp Compare two words entered by the user#include <iostream>#include <string>using namespace std;void main(){ string firstword, secondword; cout << "enter two words: "; cin >> firstword >> secondword; if (firstword==secondword) cout << "words are exactly equal" << endl; else if (firstword < secondword) cout << "first word is alphabetically less" << endl; else cout << "second word is alphabetically less" << endl;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?