Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do i do this? Write a C++ program that reads data from a file whose name is

ID: 671222 • Letter: H

Question


How do i do this?

Write a C++ program that reads data from a file whose name is input by the user, and that outputs the first word following each of the first three commas in the file. For ex ample, if the file contains the text of this problem, then the program would output and If then Assume that a comma appears within at least every 200 characters in the file. Be sure to use proper formatting and appropriate comments in your code. Provide appropriate prompts to the user. The output should be labeled clearly and formatted neatly.

Explanation / Answer

#include #include #include #include using namespace std; int main() { ifstream infile; string first_word, second_word, third_word; string filename; //prompt user to enter the file name cout > first_word; cout second_word; cout third_word; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote