Question: Using C++ Language Note: Answers must NOT be copy-pasted from the internet. Own program source code with comments. Kindly skip if you are not sure.
Using C++ Language
Note:
- Answers must NOT be copy-pasted from the internet.
- Own program source code with comments.
- Kindly skip if you are not sure.
Deliverables:
- The program file with inline documentation in the form of comments.
- input.txt file
Instructions:


Write a program that will satisfy the following: 1. The program can read a text file named input.txt (create this on your own). This file contains the text of a news article consisting of at least 100 words. 2. The program asks the user to input a word to search for. 3. The program reads the contents of the text file and counts how many times the inputted word appears. 4. The program also determines how many sentences are there in the article which is written inside the text file. Assume that every sentence is terminated by a period. 5. the main() function should only contain variable declarations and functions calls. This means that you have to implement program functionality using user-defined functions. The program should be saved as machineproblem.cpp
Step by Step Solution
There are 3 Steps involved in it
include iostream include fstream include string int countWordOccurrencesstds... View full answer
Get step-by-step solutions from verified subject matter experts
