A simple C++ program that detects consecutive repeated words in an input stream.
- Detects consecutive repeated words.
- Counts the total number of consecutive repetitions.
- Counts repetitions for each repeated word.
- A C++ compiler, such as
g++.
g++ RepeatedWords.cpp -o SourceTo read input from salam.txt and save the output to output.txt:
./Source < salam.txt > output.txtTo display the output in the terminal instead:
./Source < salam.txtRepeatedWords.cpp— C++ source code.salam.txt— Sample input file.README.md— Project documentation.
Created by MrBaji.