summaryrefslogtreecommitdiff
path: root/5p20.cpp
blob: 3dbb40fdcbb28afdda16f959c831f1064d8ac264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>

/*
 *
 * 5.20
 *
 *
 */

int main () {

	std::string s;
	std::string tmp;
	bool b = false;
	while(std::cin >> s) {
		if(tmp == s) {
			b = true;
			break;
		}
		tmp = s;
	}

	if(b) {
		std::cout << tmp << std::endl;
	} else {
		std::cout << "There were no repeating words" << std::endl;
	}
	
	return 0;
}