[Solved] 2 Txt Files Input Program Txt File 1 Contains 2 3 1 1 4 0 Txt File 2 Contains 3 2 1 0 4 0 Q37298933


There will be 2 txt files that will be the input for theprogram. txt file 1 contains “2 3 1 1 4 0” and txt file 2 contains“3 2 1 0 4 0”. Code needs to be C++ and should have #includefstream and #include string.
Description We il looks lise Mariu s copled lis odyseya uueeds to shing o do u s sar ine Toaxd to practice isju ahlits. There are several bridges that into ats in the LIL ki However, Wis bge as a sel l iles a eac lile is labele with a begves Mario special abilities tD」linip up to an arbitrar amount Df tiles farward so if the tale ocmtains the number 3 Marin can mmP 1. 2. от 3 mlos forward. sing the formation of the tiles on a particalar hridge, help Marin deteri if b caneach the front entranthe astle using t ile tk: bridge. Let’s kook at the implrmentation drtails helo Gwen an array of nom negative integers, yon nre initially pnimomad nt the first mdUX nt thr ата. Fach clement in the array represcnts your maxinmm jump length at that position Detemine if yon are able to reach thest dx. Y vl erd to rad a etof valus r a tile and store them into the arrny, the aTray size can be declared with size 50 the input filew not contain more than 50 items). You will ned to use a ed of file contolled loop but you will eed to have a counter iu ode to corectly plaoe te cueat uumber read from the file into the corroct position of the array, also for example ifyou have 25 mbers in the fle, you wat to cyele through ites0 to 21 in the array not O o 19 siuce eleets 2 to 19 contain garbage. Yo will ned to write the folloaing functions . void readFronFila(int lirtL, int& ize, ifetreank infil) this fucti takesi the array array conle ial willsvore all he ileus rea rile i after every read, in main this vlue wil be set to uig inile bj eize wil be lue a this utl update the cizo . bool getTaLastIndex (int liet [], Int elze) after calling the readFronFile funct in. this fine. tion will be “srd to determine if the last indrx can he marhrd starring frmn index D. yon may nmol ta crrstte anoter tenrary afpacity olyuse eleens to size 1 yu will also only cnsider rments D to siza – 1for list)this temporary Tray simply ma which indirs rble usng the ju lengths ron th: list aay, this fuion rets trulast index is reachahlc from thr starting index or retrns talse if thr last indexis ot achahle f thr starting index Specifications Coneul all you variables ad all your utios . Use a glohal cos sel lhe capacily of e arria use eileral 5 Du uul Liy e luucious relr lypesor the paraeler Lypes or the auopaues described in te futis above aud you t upleuet tbe uucts if you wisli as tueted, owever you uay ave additioual You nesd to perform ero thcking wca reading in the file uneaes ot exist in th di taty Sample Output g-+ haaigato8.cpp Enter ilanaaAnetherInpuFi1.tx ario PTV Thia bridge haa the workinga of ๖owser a11 over it >:{ Show transcribed image text Description We il looks lise Mariu s copled lis odyseya uueeds to shing o do u s sar ine Toaxd to practice isju ahlits. There are several bridges that into ats in the LIL ki However, Wis bge as a sel l iles a eac lile is labele with a begves Mario special abilities tD」linip up to an arbitrar amount Df tiles farward so if the tale ocmtains the number 3 Marin can mmP 1. 2. от 3 mlos forward. sing the formation of the tiles on a particalar hridge, help Marin deteri if b caneach the front entranthe astle using t ile tk: bridge. Let’s kook at the implrmentation drtails helo Gwen an array of nom negative integers, yon nre initially pnimomad nt the first mdUX nt thr ата. Fach clement in the array represcnts your maxinmm jump length at that position Detemine if yon are able to reach thest dx. Y vl erd to rad a etof valus r a tile and store them into the arrny, the aTray size can be declared with size 50 the input filew not contain more than 50 items). You will ned to use a ed of file contolled loop but you will eed to have a counter iu ode to corectly plaoe te cueat uumber read from the file into the corroct position of the array, also for example ifyou have 25 mbers in the fle, you wat to cyele through ites0 to 21 in the array not O o 19 siuce eleets 2 to 19 contain garbage. Yo will ned to write the folloaing functions . void readFronFila(int lirtL, int& ize, ifetreank infil) this fucti takesi the array array conle ial willsvore all he ileus rea rile i after every read, in main this vlue wil be set to uig inile bj eize wil be lue a this utl update the cizo . bool getTaLastIndex (int liet [], Int elze) after calling the readFronFile funct in. this fine. tion will be “srd to determine if the last indrx can he marhrd starring frmn index D. yon may nmol ta crrstte anoter tenrary afpacity olyuse eleens to size 1 yu will also only cnsider rments D to siza – 1for list)this temporary Tray simply ma which indirs rble usng the ju lengths ron th: list aay, this fuion rets trulast index is reachahlc from thr starting index or retrns talse if thr last indexis ot achahle f thr starting index Specifications Coneul all you variables ad all your utios . Use a glohal cos sel lhe capacily of e arria use eileral 5 Du uul Liy e luucious relr lypesor the paraeler Lypes or the auopaues described in te futis above aud you t upleuet tbe uucts if you wisli as tueted, owever you uay ave additioual
You nesd to perform ero thcking wca reading in the file uneaes ot exist in th di taty Sample Output g-+ haaigato8.cpp Enter ilanaaAnetherInpuFi1.tx ario PTV Thia bridge haa the workinga of ๖owser a11 over it >:{
Expert Answer
Answer to There will be 2 txt files that will be the input for the program. txt file 1 contains “2 3 1 1 4 0” and txt file 2 c… . . .
OR

