Actividad 2 Algoritmos Secuenciales
September 1, 2022 | Author: Anonymous | Category: N/A
Short Description
Download Actividad 2 Algoritmos Secuenciales...
Description
Datvgjdj 4 dmlkrgfks Akea`pks
GEZXKJPAAGÑE @e ue s`etjk dfpmgk, jdjk ue prkhm`fd y ue jgspksgtvk jkej` r`skmv`rmk, `s e`a`sdrgk prkpkragkedr ue fçkjk pr`agsk qu` mk r`su`mvd, dj`audjk dm jgspksgtvk. D dm fçkjk mk j`ekfgedfks dmlkrgfk
Pe dmlkrgfk dmlkrgfk `s ued mgsd j` j` gesruaagke`s qu` r`dmgzde ued j`sargpagñe j`sargpagñe pdsk d pdsk y pr`agsd j` ue prka`sk prka`sk qu` ldrdetzd ldrdetzd qu` r`su`mv` r`su`mv` audmqug` audmqug`rr prkhm`fd prkhm`fd qu` p`r`e`za p`r`e`zadd d ue tpk j``rfgedjk, y qu` `rfged j`spuçs j` qu` s` ndyde mm`vdjk d adhk ue eóf`rk iegk j` pdsks. Mks Mks dmlk dmlkrg rgf fks ks s` `sar `sargh gh`e `e k s` jgs` jgs`ôd ôde e ak ake e `m prkp prkpñs ñsg gk k j` r`sk r`skmv mv`r `r prkh prkhm` m`fd fds, s, k fäs fäs `xdadf`e` prkhm`fds dmlkræfgaks. Pe prkhm`fd dmlkræfgak `s audmqug`r prkhm`fd, akea`pudm k präatak, auyd skmuagñe pu`j` `xpr`sdrs` f`jgde` ue dmlkrgfk. Md r`skmuagñe j` ue prkhm`fd `e geikrfätad
Deämgsgs j`m prkhm`fd. @m khc`tvk j`m deämgsgs j`m prkhm`fd, `s dyujdr dm prklrdfdjkr d mm`ldr d ag`rd akfpr`esgñe j` md edurdm`zd j`m fgsfk. @m prgf`r pdsk pdrd `eakerdr md skmuagñe d ue prkhm`fd f`jgde` ued akfpudjkrd `s `m deämgsgs j`m prkhm`fd prkhm`fd ake ued j`iegag j`iegagñe ñe mk fäs `xdad `xdad pksghm pksghm`. `. ”@std ids` r`qug`r` ekrfdmf`et` `m fäxgfk j` gfdlgedagñe y ar`dvgjdj pkr pdrt` j`m prklrdfdjkr‖
Deämgsgs j`m prkhm`fd `e geikrfätad
@c`fpmk3 @mdhkrdr `m deämgsgs pdrd kh`e`r `m är`d y `m jgäf`rk j` ued agraue`r`eagd.
Datvgjdj 4 dmlkrgfks Akea`pks
J`egagñe j`m prkhm`fd3 prkhm`fd 3 Ptmgzdr mds ñrfumds j`m är`d y `m jgäf`rk `e ueagñe j`m rdjgk. @sp`agiadagke`s @sp`agiadagk e`s j` `erdjd3 Mds `erdjds j` jdks s` r`jua`e dm jdk akrr`spkejg`e` dm rdjgk j`m aæraumk. Jdjd md edurdm`zd j`m fgsfk y `m prka`jgfg`ek dm audm mk skf``r`fks, su tpk j` jdk j`h` s`r ue eóf`rk r`dm. @sp`agadagke`s j` sdmgjd3 sdmgjd3 Mds sdmgjds s`räe jks jdks dfhgçe r`dm`s3 är`d y jgäf`rk. Md iedmgzdagñe j` md ds` j` deämgsgs j`m prkhm`fd eks mm`vdræd dm sglug`e` r`sumdjk
DEDMGQGQ @erdjds @erdjds33 Xdjgk j`m aæraumk (vdrgdhm` XDJGK) Qdmgjds33 Qup`riag` j`m aæraumk (vdrgdhm` DX@D) Qdmgjds Jgäf`rk j`m aæraumk (vdrgdhm` aæraumk (vdrgdhm` JGDF@ZXK) Ydrgdhm`s33 XDJGK, DX@D, JGDF@ZXK, _G3 tpk r`dm Ydrgdhm`s
_rka`sk3 är`d6 pg * rdjgk dm audjrdjk Jgs`ôk j`m dmlkrgfk3 Jgs`ôdr ue dmlkrgfk Jgs`ôdr dmlkrgfk pu`j` pu`j` s`r ued ued dr`d jgagm jgagm y su dpr`ejg dpr`ejgzdc` zdc` ek `s gef`jgdk gef`jgdk,, yd qu` s` r`qug`r` j` ued hu`ed jksgs j` `xp`rg`eagd y ar`dtvgjdj.
Pe dmlkrgfk j`h` s`r pr`agsk ` gejgadr `m krj`e j` r`dmgzdagñe j` adjd pdsk. Pe dmlkrgfk dmlkrgfk j`h` `sdr j`iegjk. j`iegjk. Qg s` sglu` ue dmlkrgfk dmlkrgfk jks v`a`s, v`a`s, s` j`h` kh`e`r `m fgsfk r`sumdjk adjd v`z. Pe dmlkrg dmlkrgfk fk j`h` j`h` s`r iegk. iegk. Qg s` sglu` sglu` ue dmlkrg dmlkrgfk fk s` j`h` j`h` `rfge `rfgedr dr `e dmlóe dmlóe fkf`ek2 k s`d, j`h` `e`r ue euf`rk iegk j` pdsks.
@c`fpmk. // Dmlkrgfk aktjgdek pdrd adfhgdr ue mmded j` ue dukfñvgm Gegagk
Datvgjdj 4 dmlkrgfks Akea`pks
`sarghd "4. Zrd`r ldk." mmdfdr eu`vd[mge`d `s `sar argh ghdd "8 "8.. M` M`vd vde edr dr `m adrr adrrk k ake ake `m ldk ldk." ." mmdfdr eu`vd[mge`d eu`vd[mge`d `s `sarg arghd hd "1. Dkcdr Dkcdr kregm kregmmks mks j` mds mmded mmdeds." s." mmdfdr eu`vd[mge`d eu`vd[mge`d
`s `sarg arghd hd ":. Qdadr Qdadr mks kregm kregmmks mks j` mds mmde mmdeds. ds."" mmdfdr eu`vd[mge`d eu`vd[mge`d `s `sar argh ghdd "0 "0.. Tug Tugdr dr md mmde mmded d." ." mmdfdr eu`vd[mge`d eu`vd[mge`d `s `sar argh ghdd "9 "9.. _ke` _ke`rr md mmde mmded d j` r`pu r`pu`s `sk k." ." mmdfdr eu`vd[mge`d eu`vd[mge`d `s `sar argh ghdd "< ".. Dp Dpr` r`d drr mk mkss k kre regmgmmk mks. s."" mmdfdr eu`vd[mge`d eu`vd[mge`d `s `sar argh ghdd "7 "7.. Hdcd Hdcdrr `m ldk ldk." ." ie @c`fpmk4. // J`amdrdr vdrgdhm`s X`dm rdjgk, är`d, jgäf`rk, _g Gegagk _g=-1.4:49 // M`` jdks k pgj` jdks pkr pdedmmd @sarghd " jglg` `m rdjgk j`m agraumk‖ M`d rdjgk // @`aód aämaumks Jgäf`rk =- rdjgk * 8 Är`d =- pg *(rdjgk*rdjgk) // Fu`srd jdks pkr pdedmmd k gfpr`sks @sarghd " `m rdjgk j`m agraumk agraumk ", rdjgk," su jgäf`rk `s ", jgäf`rk mmdfdr eu`vd-mæe`d @sarghd " `m är`d j`m agraumk `s ", är`d Ige
X`dmga` mds sglug`et`s davgjdj`s, ue jgdlrdfd j` uck k ps`ujkañjglk j` 3
@vdmudagñe Akea`ptks prklrdfdagñe, dmlkrgtfks
Datvgjdj 4 dmlkrgfks Akea`pks
@c`fpmk pkt`eagd (`mdhkr` `m deämgsgs akrr`spkejg`e` d `s` dmlkrgfk, skmuagke` `m
pmde`djk) //`m`vd eóf`rk dm audjrdjk // J`amdrd vdrgdhm`s @e`rk euf4, r`sumdjk Gegagk // M`` jdks @sarghd "Jglg` prgf`r eóf`rk3 " M`d euf4 // Nda` aämaumks X`sumdjk =- euf4U8 // Fu`srd r`sumdjks @sarghd "`m eóf`rk ", euf4, " `m`vdjk d md pk`eagds 8 `s ", r`sumdjk Ige @mdhkr` ue dmlkrgfk pdrd qu` eks pgjd md pk`eagd qu` qu`rdfks `m`vdr `m eóf`rk jdjk (_drd sdadr `m sæfhkmk U pumsdr Dm 7: 6 U)
@vdmudagñe Akea`ptks prklrdfdagñe, dmlkrgtfks
Nds pkjgjk ake adjd uek j` mks j`sdiæks qu` nds `eir`etdjk. W tg`e`s mk e`a`sdrgk pdrd sdmgr dgrksk `e fuanks, fuanks fäs. @xglgrt` y pke`rt` d pru`hd pu`j` jdrt` fg`jk. _`rk tdfhgçe pu`j` s`r vglkrgzdet` y `stgfumdet`. Fdra`md Kpdzk Adstrk X`dmga` mds sglug`et`s davgjdj`s, davgj dj`s, ue ps`ujkañjglk ps`ujkañjgl k `e M__ j` 3
4. Aka kage gedr dr `m dr drrk rkzz 8. Irgd rgdrr u ue e nu nu`vk //dmlkrgfk pdrd rgdr ue nu`vk gegagk @sarghd " dmlkrgfk pdrd rgdr ue nu`vk" mmdfdr eu`vd[mge`d @sarghd "pdsks d s`lugr" mmdfdr eu`vd[mge`d @sarghd " 4. nu`vk, ued sdr`e, da`g` "
Datvgjdj 4 dmlkrgfks Akea`pks
mmdfdr eu`vd[mge`d @sarghd " 4.`ea`ej`r md mmdfd j` md `sud " mmdfdr eu`vd[mge`d @sarghd " 8.akmkakdr md sdr`e `e md mmdfd j` md `sud " mmdfdr eu`vd[mge`d @sarghd " 1.akmkadr y `spdragr `m da`g` `e `m sdr`e " mmdfdr eu`vd[mge`d `sarghd " : j`cdr adm`edr `m da`g` " mmdfdr eu`vd[mge`d @sarghd " 0.rkfp`r md adsadrd j`m nu`vk `e `m vkrj` " mmdfdr eu`vd[mge`d @sarghd " 9.j`cdr ad`r `m ake`egjk j`m nu`vk `e md sdr`e " mmdfdr eu`vd[mge`d @sarghd " .ued v`s rgk `m nu`vk m`vdedr `m sdr`e j` md mmdfd" mmdfdr eu`vd[mge`d @sarghd " 7.vkm`dr md sdr`e skhr` ue pmdk y `sp`rdr d qu` `m nu`vk s` j`smga` ndsd `m pmdk" mmdfdr eu`vd[mge`d @sarghd " 4?.n`andr ued pgsdad j` sdm skhr` `m nu`vk" mmdfdr eu`vd[mge`d @sarghd " `rfgedjk" ie
1. J` J`svd svdrdr rdrs` s` `e `e md p pgea geandj ndjdd j` ue ue adrrk adrrk
Datvgjdj 4 dmlkrgfks Akea`pks
//dmlkrgfk pdrd j`svdrdr j` ued pgeandjk j` adrrk gegagk @sarghd " dmlkrgfk pdrd j`svdrdr j` ued pgeandjk j` adrrk " mmdfdr eu`vd[mge`d @sarghd " pdsks d s`lugr " mmdfdr eu`vd[mge`d @sarghd " 4.dhrgr `m fdm``rk " mmdfdr eu`vd[mge`d @sarghd " 8.sdadr md arua`d, md mmded j` r`pu`sk, y `m ldk ngjrdumgak " mmdfdr eu`vd[mge`d @sarghd " 1.utmgzdr `m ldk pdrd m`vdedr `m adrrk " mmdfdr eu`vd[mge`d @sarghd " :.utmgzdr md arua`d pdrd skmdr mds u`rads j` md mmded" mmdfdr eu`vd[mge`d @sarghd " 0.hdcdr md mmded pgeandjd y r``fpmzdrmdr pkr md j` r`pu`sk " mmdfdr eu`vd[mge`d @sarghd " 9.akmkadr mds u`rads y dpr`drmds ake md arua`d " mmdfdr eu`vd[mge`d @sarghd " .ludrjdr md mmded pgeandjd,md arua`d, y `m ldk ngjrdumgak `e `m fdm``rk " mmdfdr eu`vd[mge`d @sarghd " 7.a`rrdr `m fdm``rk " mmdfdr eu`vd[mge`d @sarghd " `rfgedjk " ie
:. Mm`l Mm`ldr dr d `su `sujg jgdr dr dm dm Q@E Q@ED D //dmlkrgfk pdrd mm`ldr dm s`ed
Datvgjdj 4 dmlkrgfks Akea`pks
gegagk @sarghd " dmlkrgfk pdrd mm`ldr dm s`ed " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " pdsks d s`lugr " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 4.m`vdedra` 4.m`vdedra` " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 8.hdôdrs` y h`stra` " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 1.j`sdyuedr " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " :.da`radrjs` d md pu`rd" mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 0.dhrgr md pu`rd " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 9.sdmgr pkr md pu`rd y ds`lurdrmd " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " .mm`ldr d md `sdagke y r`adrldr md drc`d " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 7.pdldr `m pdsdc` y `sp`rdr `m rdsfgm`egk " mmdfdr eu`vd[mge`d @sarghd " 4?. suhgr dm rdsfgm`egk " mmdfdr eu`vd[mge`d @sarghd " 44. `sp`rdr d qu` `m rdesfgm`egk mm`l` d md `sdagke j` pdmkqu`fdk " mmdfdr eu`vd[mge`d @sarghd " 48. mm`ldr d md `sdagke y sdmgr j` md `sdagke " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 41. adfgedr j` md `sdagke ndsd md a`j`" mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " 4:. mm`ldr d md a`j` " mmdfdr eu`vd[mge`d eu`vd[mge`d @sarghd " r`rfgedr "
Datvgjdj 4 dmlkrgfks Akea`pks
ie
X`dmga` mds sglug`et`s davgjdj`s,ue deämgsgs pdrd adjd prkhm`fd pmdet`djk ake su r`sp`avk ps`ujkañjglk`e M__ j` 3
4) _gj` `m `m ekfhr` j` j` ued p`rsked p`rsked y qu` jgld jgld ueks fgeuks, fgeuks, qu` qu` `sks fgeuks fgeuks s` vu`mvd vu`mvde e s`luejks y audeks fgeuks dmde pdrd akfpm`dr ued nkrd. Deämgsgs3 @erdjds3 ekfhr` j` ued p`rsked, fgeuks, (vdrgdhm`s3 ekfhr`, fgeuks) Qdmgjds3 ekfhr` j` md p`rsked, fgeuks, s`luejks, fgeuks dmde`s pdrd md nkrd (vdrgdhm`3 ekfhr`, fgeuks, s`luejks, nkrd) Ydrgdhm`s3 ekfhr`, fgeuks, s`luejks, nkrd
Datvgjdj 4 dmlkrgfks Akea`pks
8) Pe v`ej`j v`ej`jkr kr r`agh` r`agh` ue su`mjk su`mjk hds` fäs fäs ue 4?% `xrd `xrd pkr akfgsgñ akfgsgñe e j` su suss v`eds, v`eds, `m v`ej`jkr j`s`d sdh`r auäek jge`rk kh`ejrä pkr akea`pk j` akfgsgke`s pkr mds r`s v`eds qu` r`dmgzd `e `m f`s y `m kdm qu` r`aghgrä `e `m f`s kfdejk `e au`ed su su`mjk hds` y akfgsgke`s. Deämgsgs @erdjds3 Qu`mjk hds`, akfgsgke`s, r`s v`eds (v`ed4, v`ed8, v`ed1) Qdmgjds3 Jge`rk kh`egjk pkr akea`pk j` akfgsgke`s Ydrgdhm`s3 Qu`mjk, akfgsgke`s, v`ed4, v`ed8, v`ed1 1) Ped t`ejd t`ejd kr`a` kr`a` ue j`sau`e j`sau`ek k j`m 40% skhr` `m kdm kdm j` md akfprd akfprd y ue amg`e amg`e`` j`s`d j`s`d sdh`r auäek j`h`rä pdldr iedmf`e` pkr su akfprd. Deämgsgs @erdjds3 Zkdm akfprd, j`sau`ek 40%, kdm d pdldr pkr md akfprd. Qdmgjds3 Zkdm d pdldr pkr md akfprd Ydrgdhm`s3 Zkdm[Akfprd, J`sau`ek, Zkdm[_dldr :) Pe dmufek j`s`d sdh`r auäm s`rä su admgiadagñe iedm `e md fd`rgd j` Dmlkrgfks. Jgand admgiadagñe s` akfpke` j` mks sglug`e`s pkra`edc`s3 00% j`m prkf`jgk j` sus r`s admgiadagke`s pdragdm`s. 1?% j` md admgiadagñe j`m `xdf`e iedm. 40% j` md admgiadagñe j` ue rdhdck iedm. Dedmgsgs @erdjds3 Admgiadagke4, Admgiadagke8, Admgiadagke1 (prkf`jgk), @xdf`e iedm (prkf`jgk), Zrdhdck iedm (prkf`jgk), Admgiadagñe Igedm Qdmgjds3 Admgiadagñe iedm Ydrgdhm`s3 Ydrgd hm`s3 Admgiadag Admgiadagke4, ke4, Admgiadag Admgiadagke8, ke8, Admgiada Admgiadagke1, gke1, @xdf`e[ie @xdf`e[iedm, dm, Zrdhdck[ Zrdhdck[iedm, iedm, prkf`jgk, prkf`jgk, _kr_dragdm, _kr@xdf`eI, _krZrdhdckI, Admgiadagke[Igedm Admgiadagke[Igedm _rka`jgfg`ek suhgr datvgjdj `e Q`ed Q`ed Qkd pmus _DXD @EYGDX @M _XKW@AZK Z@E@X @E AP@EZD MKQ QGLPG@EZ@Q _DQKQ
Nda`r amga `e `m `emda` Nda`s amga `e `m hkñe j` `xdfgedr Husads `e u jgsak jurk y s`m`aagked `m drangvk jkej` r`dmgzds` md datvgjdj Amga `e `m hkñe dhrgr J`h`s `evgdr dmlóe akf`edrgk dm ukr pdrd `mmk prka`j`s d `sarghgr `e md kpagñe akf`edrgks Qg `s fds j` ue drangvk d `evgdr j`h`s nda`r amga `e djcuedr krk drangvk _drd `rfgedr j`h`s nda`r amga `e `evgdr Akrr`agke
Datvgjdj 4 dmlkrgfks Akea`pks
_uek 1
View more...
Comments