Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Then print a line of 50 or more stars( * ) as a break between sections. Asks the user the following question and wait

c++

  • Then print a line of 50 or more stars("*") as a break between sections.
  • Asks the user the following question and wait for a number answer.
    • "What size word do you want?"
    • Make sure that they input a number between 1 and 30.
      • Use an input validation loop.
  • Open up the file : WordList.txt
    • This file contains a large number (> 150000) of single English words.
  • Count how many words there are of that length and print it out.
    • In order to find the size of a string
      • #include
      • Then use strname.length() to get the length of a string.
        • For example x = myString.length();
  • Close the file.
  • Create an array the size of your count, or create a vector.
    • For an array, you will need to use a pointe to get it of the correct size.
  • Reopen the WordList.txt file.
  • Read all the words of that are the same size as the indicated size into the array/vector.
  • Write all the words from that array onto the screen AND into a file backward.
    • The file name should be WordFile2.txt
    • So for example,
      • if the user selected words of size 3, then I should see "ZOO" before I see "AND".
  • Close both files.
  • Open the original file one more time.
  • Find the largest word in the list and print it out.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

4. Describe some cultural differences in the notion of friendship.

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago