定义附加项
2016-02-20 20:29
429 查看
#include <iostream> #include <string> using namespace std; int main () { string k1,k2; cout << "Enter some words:(Ctrl + I to end)" << endl; while(cin >> k1) { #ifndef NDEBUG cout << endl << "调试:" << k1 << endl; // 这是调试用的, #endif if( !isapper(k1[0])) continue; if(k1 == k2) break; else k2 = k1; } if(k1 == k2 && !k1.empty()) cout << "The repeated word:" << k1 << endl; else cout << "没有重复的!" << endl; return 0; }
相关文章推荐
- ndk配置教程和导入jni的include(可查看c源码)
- java自己主动生成验证码
- MySQL_表操作语句
- sync/fsync/fdatasync的简单比较
- POJ--3617 Best Cow Line
- linux 同步IO: sync、fsync与fdatasync
- python-字典学习笔记
- Httpwatch抓包分析
- hihocoder #1078 : 线段树的区间修改
- MyCat - 背景篇(2)
- 重温C++ 之 重载操作符
- python-元组学习笔记
- 【Python环境】如何使用正确的姿势进行高效Python函数式编程?
- MyCat - 背景篇(1)
- 到底什么是接口
- POJ--3069 Saruman's Army
- Item 55:熟悉一下Boost
- Atitit.异步编程的发展历史 1.1. TAP & async/await
- 正则表达式 linux shell
- java设计模式——观察者模式