Question: 3-7. Write a program that will use random number generation to create sentences. Use the following tour arrays to pick a word at random to

 3-7. Write a program that will use random number generation to

3-7. Write a program that will use random number generation to create sentences. Use the following tour arrays to pick a word at random to form a grammatically correct sentence. The sentence will begin with an uppercase letter and end in a period. Use the following order fron the following arrays: artice, noun, verb, preposition, article, and noun. Run your program in the console window, copy and paste the results, and save in ex3-7.bd as a plain text file. Attach your ex3 7.cpp program file and your ex3-7.txt output text file, and submit. article "the", "a", "one", "some", "any noun "boy", g "dog", toum", "car verb "drove" jumped", "ran", walked", "skipped preposition - To", Trom", "over. "under", on The program is started below, fill in the for loop. Bill Wohlleber Exercise 3-7 Thia program il1 generate random sentencea #include.cstring> # 1 nclude # include u ing name space std; void main) char article [5][5] {"the", "a", "one", "some", "any"); char noun [5][5] = {"boy", "girl", "dog", "town". "car"); char verb[5 [9]"drove", "1umped", "rar", "alke" "skipped"; char prepoaition [5] [6]"to""from", "over", "under", "on" char gent 136]i int ii srand (time (NULL) ; * use cstring functions to copy a random initial article, then use cstring functions to cat the other words onto the end of the sentence (in the above order). Also cat spaces between words and a period at the end of the sentence, along with making sure just the first letter of the sentence is uppercase. V

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!