Write a C++ program Design and write a program that will accept a sentence as input, reverse the words and print the sentence out backwards. The individual words should not be reversed as we did in class. The words in the sentence should be in reverse order. Example Input: The movie was not very true to the book.Output: book the to true very not was movie The   (NOTE: You may keep the period at the end if you want to.) Turn in your design (Flow Diagram) along with your code and screen shots. You can use a program like PowerPoint or some other drawing package for this or you can draw it by hand then take a picture and upload the picture along with your code and output. The following problem requires the file dictionary_four_letter_words.txt. (unable to attach the file, but copied some of it below) aahs aals abas abba abbe abed abet able ably abos abri abut abye abysaced aces ache achy acid acme acne acre acta acts acyl adds adit adosadze aeon aero aery afar agar agas aged agee ager ages agha agin agioagly agma agog agon ague ahed ahem ahis ahoy aide aids ails aims ainsairn airs airt airy aits ajar ajee akee akin alae alan alar alas albaalbs alec alee alef ales alfa alga alif alit alky alls ally alma almealms aloe alow alps also alto alts alum amah amas ambo amen amia amidamie amin amir amis ammo amok amps amus amyl anal anas ands anes anewanga anil anis ankh anna anoa anon ansa anta ante anti ants anus apedaper apes apex apod apos apps apse aqua arak arbs arch arco arcs areaares arfs aria arid aril arks arms army arse arts arty arum arvo arylasci asea ashy asks asps atap ates atma atom atop auks auld aunt auraauto aver aves avid avos avow away awed awee awes awls awns awny awolawry axal axed axel axes axil axis axle axon ayah ayes ayin azan azonbaal baas baba babe babu baby bach back bade bads baff bags baht bailbait bake bald bale balk ball balm bals bams band bane bang bani bankbans baps barb bard bare barf bark barm barn bars base bash bask bassbast bate bath bats batt baud bawd bawl bays bead beak beam bean bearbeat beau beck beds bedu beef been beep beer bees beet begs bell belsbelt bema bend bene bens bent berg berk berm best beta beth bets bevybeys bhut bias bibb bibs bice bide bidi bids bier biff bigs bike bilebilk bill bima bind bine bins bint biog bios bird birk birl biro birrbise bisk bite bits bitt bize blab blae blah blam blat blaw bleb bledblet blew blin blip blob bloc blog blot blow blub blue blur boar boasboat bobs bock bode bods body boff bogs bogy boho boil bola bold boleboll bolo bolt bomb bond bone bong bonk bony boob book boom boon boorboos boot bops bora bore bork born bort bosh bosk boss bota both botsbott bout bowl bows boxy boyo boys bozo brad brae brag bran bras bratbraw bray bred bree bren brew brie brig brim brin brio bris brit broobros brow brrr brut brux bubo bubs bubu buck buds buff bugs buhl buhrbulb bulk bull bumf bump bums buna bund bung bunk bunn buns bunt buoybura burb burd burg burl burn burp burr burs bury bush busk buss bustbusy bute buts butt buys buzz byes byre byrl byte cabs caca cade cadicads cafe caff cage cagy caid cain cake caky calf calk call calm calocalx came camo camp cams cane cans cant cape caph capo caps carb cardcare cark carl carn carp carr cars cart casa case cash cask cast catecats caul cave cavy caws cays ceca cede cedi cees ceil cell cels celtcent cepe ceps cere cero cess cete chad chai cham chao chap char chatchaw chay chef chew chez chia chic chid chin chip chis chit chon chopchow chub chug chum ciao cigs cine cion cire cist cite city clad clagclam clan clap claw clay clef clew clip clod clog clon clop clot cloyclub clue coal coat coax cobb cobs coca cock coco coda code cods coedcoff coft cogs coho coif coil coin coir coke coky cola cold cole colscolt coly coma comb come comp cone coni conk conn cons cony coof cookcool coon coop coos coot cope cops copy cord core corf cork corm corncors cory cosh coss cost cosy cote cots coup cove cowl cows cowy coxacoys cozy crab crag cram crap craw cred crew crib cris crit croc cropcrow crud crus crux cube cubs cuds cued cues cuff cuif cuke cull culmcult cunt cups curb curd cure curf curl curn curr curs curt cusk cuspcuss cute cuts cwms cyan cyma cyme cyst czar dabs dace dada dado dadsdaff daft dago dags dahl dahs dais daks dale dals dame damn damp damsdang dank dans daps darb dare dark darn dart dash data date dato daubdaut davy dawk dawn daws dawt days daze dead deaf deal dean dear debsdebt deck deco deed deem deep deer dees deet defi deft defy deil dekedele delf deli dell dels delt deme demo demy dene deni dens dent denydere derm desk deva devs dews dewy dexy deys dhak dhal dhow dial dibs

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a C++ program

Design and write a program that will accept a sentence as input, reverse the words and print the sentence out backwards. The individual words should not be reversed as we did in class. The words in the sentence should be in reverse order.

Example Input: The movie was not very true to the book.
Output: book the to true very not was movie The  

(NOTE: You may keep the period at the end if you want to.)

Turn in your design (Flow Diagram) along with your code and screen shots. You can use a program like PowerPoint or some other drawing package for this or you can draw it by hand then take a picture and upload the picture along with your code and output.

The following problem requires the file dictionary_four_letter_words.txt. (unable to attach the file, but copied some of it below)

aahs aals abas abba abbe abed abet able ably abos abri abut abye abys
aced aces ache achy acid acme acne acre acta acts acyl adds adit ados
adze aeon aero aery afar agar agas aged agee ager ages agha agin agio
agly agma agog agon ague ahed ahem ahis ahoy aide aids ails aims ains
airn airs airt airy aits ajar ajee akee akin alae alan alar alas alba
albs alec alee alef ales alfa alga alif alit alky alls ally alma alme
alms aloe alow alps also alto alts alum amah amas ambo amen amia amid
amie amin amir amis ammo amok amps amus amyl anal anas ands anes anew
anga anil anis ankh anna anoa anon ansa anta ante anti ants anus aped
aper apes apex apod apos apps apse aqua arak arbs arch arco arcs area
ares arfs aria arid aril arks arms army arse arts arty arum arvo aryl
asci asea ashy asks asps atap ates atma atom atop auks auld aunt aura
auto aver aves avid avos avow away awed awee awes awls awns awny awol
awry axal axed axel axes axil axis axle axon ayah ayes ayin azan azon
baal baas baba babe babu baby bach back bade bads baff bags baht bail
bait bake bald bale balk ball balm bals bams band bane bang bani bank
bans baps barb bard bare barf bark barm barn bars base bash bask bass
bast bate bath bats batt baud bawd bawl bays bead beak beam bean bear
beat beau beck beds bedu beef been beep beer bees beet begs bell bels
belt bema bend bene bens bent berg berk berm best beta beth bets bevy
beys bhut bias bibb bibs bice bide bidi bids bier biff bigs bike bile
bilk bill bima bind bine bins bint biog bios bird birk birl biro birr
bise bisk bite bits bitt bize blab blae blah blam blat blaw bleb bled
blet blew blin blip blob bloc blog blot blow blub blue blur boar boas
boat bobs bock bode bods body boff bogs bogy boho boil bola bold bole
boll bolo bolt bomb bond bone bong bonk bony boob book boom boon boor
boos boot bops bora bore bork born bort bosh bosk boss bota both bots
bott bout bowl bows boxy boyo boys bozo brad brae brag bran bras brat
braw bray bred bree bren brew brie brig brim brin brio bris brit broo
bros brow brrr brut brux bubo bubs bubu buck buds buff bugs buhl buhr
bulb bulk bull bumf bump bums buna bund bung bunk bunn buns bunt buoy
bura burb burd burg burl burn burp burr burs bury bush busk buss bust
busy bute buts butt buys buzz byes byre byrl byte cabs caca cade cadi
cads cafe caff cage cagy caid cain cake caky calf calk call calm calo
calx came camo camp cams cane cans cant cape caph capo caps carb card
care cark carl carn carp carr cars cart casa case cash cask cast cate
cats caul cave cavy caws cays ceca cede cedi cees ceil cell cels celt
cent cepe ceps cere cero cess cete chad chai cham chao chap char chat
chaw chay chef chew chez chia chic chid chin chip chis chit chon chop
chow chub chug chum ciao cigs cine cion cire cist cite city clad clag
clam clan clap claw clay clef clew clip clod clog clon clop clot cloy
club clue coal coat coax cobb cobs coca cock coco coda code cods coed
coff coft cogs coho coif coil coin coir coke coky cola cold cole cols
colt coly coma comb come comp cone coni conk conn cons cony coof cook
cool coon coop coos coot cope cops copy cord core corf cork corm corn
cors cory cosh coss cost cosy cote cots coup cove cowl cows cowy coxa
coys cozy crab crag cram crap craw cred crew crib cris crit croc crop
crow crud crus crux cube cubs cuds cued cues cuff cuif cuke cull culm
cult cunt cups curb curd cure curf curl curn curr curs curt cusk cusp
cuss cute cuts cwms cyan cyma cyme cyst czar dabs dace dada dado dads
daff daft dago dags dahl dahs dais daks dale dals dame damn damp dams
dang dank dans daps darb dare dark darn dart dash data date dato daub
daut davy dawk dawn daws dawt days daze dead deaf deal dean dear debs
debt deck deco deed deem deep deer dees deet defi deft defy deil deke
dele delf deli dell dels delt deme demo demy dene deni dens dent deny
dere derm desk deva devs dews dewy dexy deys dhak dhal dhow dial dibs

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education