Write a c++ program that prompts the user for the name of a dictionary file that
ID: 3647432 • Letter: W
Question
Write a c++ program that prompts the user for the name of a dictionary file that contains 1 word per line. It should prompt for the minimum and maximum word lengths. Your program will then create a new file named filtered-dictionary file.txt that contains only the words from the original dictionary file whose length is within the user-specified bounds. So for instance, if the min is 3 and max is 8, then only words with length >= 3 and length <= 8 will be placed in the new file.Explanation / Answer
#include #include #include #include using namespace std; #define dic "dictiona.txt" ifstream dictionary("dictiona.txt"); int main() { ifstream ins; string current_word; string user_word; string line; string word_before; string word_after; string answer; string yes; string no; cout answer; do { cout > user_word; ins.open(dic); if(ins.fail ()) { cerrRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.