Question: ** USING C++ ** Write a program that prompts a user for a sentence using words that are derived from different text files (Ex. noun.txt,

** USING C++ **

Write a program that prompts a user for a sentence using words that are derived from different text files (Ex. noun.txt, pronouns.txt. adjectives.txt, verbs.txt) , and then based on 5 grammar rules:

::=

::=

::=

::=

::=

determines whether the sentence is valid or not. Also, if the user writes a sentence such as hisTORY arE yoUtH, the program should be able to convert into all lowercase.

If the sentence is legal based on all the rules, screen must display "Your sentence is a legal sentence by rule {1,2,3,4,5}." If it not legal, it should display "Your sentence is not a legal sentence."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!