Tarea 2 Programacion PDF
August 8, 2022 | Author: Anonymous | Category: N/A
Short Description
Download Tarea 2 Programacion PDF...
Description
XD^ÝHCJAF @D ^FIFGÆ GJIJQPDXJO @D D@TAFAJÑI TIJUDXQJ@F@ CFPJIF @D ^FIFGÆ EFATCPF@ @D JIKDIJDXÇF ATXQO= ^XOKXFGFAJÑI ^FXF JIKDIJDXOQ Pfrdf #8 Krupfc
JIPDKXFIPDQ= Ldvji Afhrdrf 2-:;1-802> Fi`rdf Fkujcfr 2-:4;-6651 Gfttbdw Ujsudtd 2-22;-6;14 Qfgjr Ifhbf 2-:2;-6:; Jvfi Afstjcco 2-:;1-62:5
^roedsorf= Ogfjrf Ufc`ês Mjgêidz
Edabf `d ditrdkf= ^fifgæ, 2 `d edhrdro `d 8>86
Dmdrajajos fsjkif`os `dc 6.1 6. @dtdrgjid @dtdrgjid ui proad`jgjdito proad`jgjdito pfso f pfso (cjstf (cjstf `d pfsos) pfrf bfadr bfadr cfs sjkujditds tfrdfs. (Iotf= Io bfy uif socf rdspudstf aorrdatf pfrf af`f uif `d dstfs tfrdfs. Dc dmdrajajo dstæ `jsdöf`o pfrf hrji`frcd præatjaf di aoivdrtjr aogfi`os tjpo bdurçstjao di fckorjtgos dqujvfcditds y bfadr dc afghjo ditrd cos proadsos `d pdisfgjdito jgpcjaf`os di cos `os tjpos `d pdisfgjdito.) f. Frrdkcfr uif ccfitf `dsjiecf`f=
^fso #6= Fpfkfr dc afrro y poidr dc erdio `d gfio. ^fso #8= Fecomfr cfs tudrafs. ^fso #1= Aokdr dc kfto y cdvfitfr dc afrro aoi êc. ^fso #0= Pdrgjifr `d rdgovdr cfs c fs tudrafs. ^fso #4= Qfafr cf ccfitf c cfitf fedatf`f. ^fso #5= Xddgpcfzfr cf ccfitf fedatf`f aoi uif iudvf. ^fso #;= Fcjidfr cfs ditrf`fs di dc rji `d cf ccfitf c cfitf iudvf aoi cfs rosafs pfrf sumdtfr cfs tudrafs. ^fso #2= Fprjdtfs cfs tudrafs. ^fso #:= Aoi dc kfto hfmf dc afrro. ^fso #6>= Kufr`fr dc kfto y cf ccfitf fedatf`f pfrf pfrabdfrcf di ui tfccdr. ^fso #66= Eji. = ^fso #6= `dshcoqudfr dc tdcêeoio. ^fso #8= husafr dc jaoio `d ccfgf`f di dc tdcêeoio. ^fso #1= Husafr dc tdacf`o. ^fso #0= Gfrafr dc iýgdro fc qud qujdrfs ccfgfr. ^fso #4= Tif vdz bfyfs gfraf`o to`o dc iýgdro, toafr dc hotñi vdr`d pfrf rdfcjzfr tu ccfgf`f. ^fso #5= Bfhcfr por tdcêeoio dc tjdgpo qud `dsdds. ^fso #;= Tif vdz tdrgjif`f tu ccfgf`f, toafr dc jaoio romo pfrf ejifcjzfr cf gjsgf. ^fso #2= Fc ejifcjzfr tu ccfgf`f, hcoqudfr dc tdcêeoio y aoitjiufr aoi cos qud dstês bfajdi`o. ^fso #:= Eji.
h. Bfadr uif ccfgf`f tdcdeñijaf
a. Jijajfr sdsjñi di uif aogputf`orf=
^fso #6= ^rdsjoifr dc hotñi `d diadi`j`o pfrf prdi`dr cf aogputf`orf. ^fso #8= Dspdrfr f qud afrkud dc sjstdgf. ^fso #1= Tif vdz afrkf`o, dc sjstdgf td pd`jræ ui –Ioghrd `d Tsufrjo‗. ^fso #0= Fc jikrdsfr dc –Ioghrd `d Tsufrjo‗, dc sjstdgf td pd`jræ uif acfvd. ^fso #4= Jikrdsfs cf acfvd.
^fso #5= Dc sjstdgf vdrjejaf sj cf acfvd ds vdr`f`drf. ^fso #;= Qj dc sjstdgf vdrjejaf qud `jabf acfvd ds væcj`f, yf dstæs cjsto(f). ^fso #;.6=. Qj dc sjstdgf vdrjejaf cf acfvd, y ds jivæcj`f, fsdkýrftd `d qud dstê hjdi dsarjtf. ^fso #2= Eji. `. Fsfr ui pfvo
^fso #6= Qfzoif tu pfvo. ^fso #8= ^rdpfrf ui eudko `d aoiejkurfajñi pfrfcdcf. ^fso #1= Fkrdkfcd sfhor fbugf`o f cf gf`drf. ^fso #0= Xostjzf tu pfvo. ^fso#4= Udrjejaf sj dc pfvo dstæ cjsto. ^fso #5= @êmfco rdposfr. ^fso #;= Aortfco. ^fso #2= Qjrvdtd y `jserutf. ^fso #:= Eji. 8 .¿Cos proad`jgjditos qud `dsfrroccñ di dc dmdrajajo 6 soi fckorjtgos? @jsautf por quê sç o por quê io.
X./ Qj, cos proad`jgjditos qud `dsfrroccfgos di dc dmdrajajo 6 soi fckorjtgos yf qud sdræi utjcjzf`os pfrf rdsocvdr uif jiañkijtf y di afso tfc sd vudcvdi f prdsditfr cos gjsgos prohcdgfs, sd pud`di vocvdr vocvdr f utjcjzfr pfrf rdsocvdr rdsocvdr `jabo prohcdgf. prohcdgf. 1. @dtdrgjid y `dsarjhf ui fckorjtgo ( cjstf `d pfsos ) pfrf jitdrafghjfr cos aoitdij`os `d `os tfzfs `d cçquj`o. Qupoikf qud `jspoid `d uif tdradrf tfzf pfrf aoisdrvfr dc aoitdij`o `d aufcqujdr tfzf `d gfidrf tdgporfc. Af`f tfzf `dhdræ dimufkfrsd fitds qud aufcqujdr cçquj`o iudvo sd vjdrtf di dccf.
---------------------------------------------------------------------------------------------------------------#jiacu`d 3jostrdfg9 #jiacu`d 3aoijo.b9 usjik ifgdspfad st`< jit gfji() { aout33"^rohcdgf 6Si Jitdrafghjfr dc aoitdij`o `d `os tfzfs, utjcjzfi`o uif tdradrf tfzf."33di`c< aout33"^fso 6=Si Cfvfr cf 1drf tfzf."33di`c< aout33"^fso 8=Si @dposjtfr dc aoitdij`o `d cf 6drf tfzf di cf 1drf tfzf."33di`c< aout33"^fso 1=Si Cfvfr cf 6drf tfzf."33di`c< aout33"^fso 0=Si @dposjtfr dc aoitdij`o `d cf 8`f tfzf di cf 6drf tfzf."33di`c< aout33"^fso 4=Si Cfvfr cf 8`f tfzf."33di`c< aout33"^fso 5=Si @dposjtfr dc aoitdij`o `d cf 1drf tfzf di cf 8`f tfzf."33di`c< aout33"^fso ;=Si Cfvfr cf 1drf tfzf."33di`c< aout33"^fso 2=Si Eji."33di`c< rdturi(>)< }
----------------------------------------------------------------------------------------------------------------
0. Dsar Dsarjh jhf f ui ao aoim imui uito to `d jist jistru ruaa aajo joid idss `d `dtf tfcc ccf` f`o, o, di ds dspf pföo öoc, c, pfrf pfrf af afca cauc ucfr fr cf rd rdsj sjst stdi di-ajf `d cos sjk jku ujditds rdsjs sjstor tords ao aoi idatf` tf`os di sdr sdrjd jd== i rdsjstords, af`f uio aoi uif rdsjst stddiajf `d 45 obgjos, g rdsjstords, af`f uio aoi uif rdsjstdiajf `d 11 obgjos, y p p rdsj rdsjst stor ords ds,, af`f af`f uio aoi aoi uif uif rdsj rdsjst stdi diaj ajf f `d 64 ob obgj gjos os.. Iotd Iotd qud cf rdsj rdsjst stdi diaj ajf f to totf tfcc `d co coss rdsjstords aoidatf`os di sdrjd ds cf sugf `d to`fs cfs rdsjstdiajfs ji`jvj`ufcds. ●
^fso 6 aoioadr dc vfcor `d i, g, p
●
^fso 8 Afcaucfr cf rdsjstdiajf di sdrjd XQ 7 ( i * 45 ) + ( g * 11 ) + ( p * 64 )
●
^fso 1 3 Gostrfr cf rdsjstdiajf sdrjd ( XQ )
●
^fso 0 Eji
4. Dsarjhf ui aoimuito `d jistruaajoids `dtfccf`fs pfso f pfso, pfrf diaoitrfr dc iýgdro gæs pdqudöo di ui krupo `d trds iýgdros ditdros. ●
^fso 6 Aoioadr dc vfcor i6, i8, i1
●
^fso 8 Udrjejafr dc vfcor gdior y `dspcdkfrco sj ( i6 37 i8 y i6 37 i1 ) `dspcjdkf i6 `d co aoitrfrjo sj ( i8 37 i6 y i8 37 i1 ) `dspcjdkf i8 `d co aoitrfrjo `dspcjdkf i1
●
^fso 1 Eji
5. f. Dsarjhf ui aoimuito `d jistruaajoids `dtfccf`fs pfso f pfso, pfrf afcaucfr dc iýgdr ýgdro o gdio gdiorr `d hjcc hjccdt dtds ds di `ñcf `ñcfrd rdss idads dadsfr frjo joss pfrf pfrf pfkf pfkfrr uif uif efat efatu urf `d uif afi afitj` tj`f` POPF OPFC. ^or ^or dm dmdg dgp pco, co, sj POPF OPFC eu eudr drf f $:;, $:;, cos cos hjccd jccdtd tdss aoi aoisjst sjstjr jræi æi di uio `d $4 $4>, >, `os `os `d $8>, uio `d $4 y `os `d $6. (^frf dstd dmdrajajo, supoikf qud sñco dstæi `jspoijhcds hjccdtds `d $6>>, $4>, $8>, $6>, $4 y $6.)
6 Xdaoioadr dc vfcor `d cos hjccdtds y aoitfr pfrf fvdrjkufr dc vfcor totfc. 8. Tsfr cf gdior afitj`f` `d hjccdtds posjhcds pfrf eorgfr ui vfcor `dtdrgjif`o 1. Tsfr dstrftdkjfs `jedrditds pfrf eorgfr dc totfc y `fr dc gdior afghjo posjhcd. h. Xdp dpjt jtf f dc dmdr draaja jajjo 5f, pdro supoikf qud cf efatu aturf `dh dhdd pfkfr fkfrssd sñ sñcco aoi hjc jcccdtds tds `d $6.
6. Xdao Xdaoioad ioadrr auæitos auæitos hjccdtds hjccdtds `d $6 dstæi dstæi ``jspoi jspoijhcds jhcds 8. Qug Qugfr fr cos hjccdt hjccdtds ds f uutjcj tjcjzfr zfr 1. @fr cos hj hjccdtd ccdtdss `d $6 ao aoii cf afitj`f` afitj`f` to totfc tfc ida idadsfr dsfrjf jf pfrf pfkfr pfkfr cf efatur efaturff ;. f. Dsar arjjhf ui fck fckorj orjtgo tgo pfrf coafc oafcjjzf zfrr cf prj rjg gdrf oa oau urr rrddiajf `dc ioghrd MDFIQ di uif cjstf `d ioghrds or`dif`f fc fzfr.
---------------------------------------------------------------------------------------------------------------#jiacu`d3jostrdfg9 usjik ifgdspfad st`< jit gfji() { strjik str7 "Si6.EjdrroSi8.MdfisSi1.AortfrSi0.^fitfcoiSi4.BjdrroSi5.BjdcoSi;.Mdfis"< "Si6.EjdrroSi8.MdfisSi1.AortfrSi0.^fitfcoiSi4.BjdrroSi5.BjdcoSi;.Mdfis"< aout 33 str33'Si'< aout 33" Cf prjgdrf jistfiajf `d cf pfcfhrf 'Mdfis' sd diauditrf `dspuês `d R afitj`f` afrfatdrds= R 7 "< aout33 str.eji`("Mdfis")< rdturi >< }
----------------------------------------------------------------------------------------------------------------
h. @jsautf añgo po`rçf gdmorfr su fckorjtgo pfrf dc dmdrajajo sj cf cjstf `d ioghrds dstuvjdrf di or`di fcefhêtjao.
X/. Qj cf cjstf dstuvjdrf di or`di fcefhêtjao, sñco bfhrçf qud bfadr qud dc fckorjtgo jkiord aufcqujdr to` to`fs cfs pfcfhrfs qud io tdiko cf jij jijajfc `d cf pfcfhrf, di ds dstd afso cf –M‗ por cf pfcfhrf –Mdfis‗, –Mdfis‗, y qud ssoco oco vdrjejqud sj cf pf pfcfhrf cfhrf aoi cf –M‗ aogo jijajfc sdf –Mdfis‗.
2. Dsarjhf ui fckorjtgo pfrf `dtdrgjifr cfs oaurrdiajfs totfcds `d cf cdtrf d di aufcqujdr diuiajf`o.
9 X7 jikrdsfr cf cdtrf d di dc aogputf`or 9 Dcdkjr y `dejijr dc diuiajf`o qud sd fifcjzfræ 9 Qugfr to`fs cfs vdads qud "d" fpfrdzaf di dc diuiajf`o `d uio di uio= sdrjf d76
:. @dtdrgjid y dsarjhf ui fckorjtgo pfrf acfsjejafr auftro iýgdros di or`di fsadi`ditd (`d gdior f gfyor).
---------------------------------------------------------------------------------------------------------------#jiacu`d 3st`jo.b9 #jiacu`d 3st`cjh.b9 #jiacu`d 3gftb.b9 jit gfji() { prjite("Si ^rokrfgf ^frf Or`difr Iugdros (@d Gfidrf Fsadi`jditd) Fsadi`jditd) Si")< jit iugdros_f_or`difr< prjite(" Afitj`f` `d Iugdros f Or`difr= Or`difr= ")< safie(" %`", &iugdros_f_or`difr)< prjite("Si Iugdros f Or`difrSi")< jit vdator_iugdros\iugdros_f_or`difrW< jit j, m, l76< eor(j7>< }
----------------------------------------------------------------------------------------------------------------
;. f. Dsarjhf ui prokrfgf di A++ pfrf `dspcdkfr co sjkujditd= Cf aosdafitd aosdafitd `d ui æikuco ds jkufc f uio `jvj`j`o ditrd dc sdio `dc æikuco. h. Aogpjcd y dmdautd dc prokrfgf qud bf dsarjto pfrf dc dmdrajajo ;f di uif aogputf`orf.
---------------------------------------------------------------------------------------------------------------#jiacu`d 3jostrdfg9 #jiacu`d3st`jo.b9 usjik ifgdspfad st`< jit gfji(jit frka, abfr *frkv\W) { aout33"StSi cf aosdafitd `d ui æikuco ds jkufc jkufc f uio `jvj`j`o ditrd dc sdio `dc æikuco"< rdturi >< }
----------------------------------------------------------------------------------------------------------------
View more...
Comments