!"
#$&%('* ) ',+-/.02143506'4-7'98:+<;9=>;?'@+-BA4;C6150ED1FC6?.G1@?IHC6;?0!1 * 15-BJ4K7;=>;L-9;LH4CM14NLO * '= * +<=>;;
?I-7.0!?-'P
Q 'R,STN61<-'UD;VC61<D14NW14N&N6;L+<NX;=>;L-9;LHC614NLY
Q[Z R\S]-9+<=>C6?.<=>? * '^*4) '_ 1@D14NW;=>;L-9;LHC614NXD'N`.G14N6?!*4) 14_ ;Na.'40!;NLY
bG$Wc;L0d+-eA4;C6150,D;
JK * '406' * C6;L02;N@;f;L-gN6;3<+<?hD'GP Q 'R?-.0!?-9?0i8+'4HC614Nd'NMC6;L0!?>N * 14N
'4.'40!; * ;L-jH<17A4;C6150Y Q[Z R'NW.14N6?!*4) 14_ ;NX15H<D;9'4.'40!; * ;aA4135'?>NL$
kG$&%('* ) 'i+-l.0!13506'4-'i.'40M'd=>;L0+-mA4;C6150UD;dn<KoHp+ -q;L0!14N?HC6;?0!14N;d+-rA'=>150\s Q D1
C6?.19?H4C6;?0!1<R$utv-wN6;35+<?>D'O<?-.0!?-9?0W'U.0!?-9;?06'9.14N6?!*4) '_ 19;L-w8+<;VsW'4.'40!; * ;aH<19A4;C6150$
x 'N61,syH 'z_ 1;N6C6;!{6'H<1A4;CM150O<?-.0!?-9?0a-9;LH<N|'3;L- * 15-w;N6N|'9?H}[1506-'^*4) '_ 1$
n~$W`+-'€;=>;?*4) 'z_ 1].'40M'‚A4;L0!;L'zD150@D;‚+-' * ;L0!C|' * ?>D'D;‚;ƒ<?hNMC6;L-„k4K * '4H<D?>D'CM14N * 15HWp+ -9;L0!14NUD;d#F'@k4K Q 15+…N6;!{6'@1 * '4H<D?>D'C61
#7C6;L-†Hp+ -q;L0!1
#4O$$$91 * '4H<D?>D'C61oH‡C6;LHWp+ -9;L0!1ˆHR$Š‰a;NM;!{2'Œ‹NM;`'4.+06'40Ž8:+'H4C61NvA414CM14N * 'D' * 'H<D?hD'zC61VC6;A;`;`'8:+'H4C6?>D'D;XD;
A414C614N&H5+<=>14N Q A'=>150E?h3<+'=Š'9‘;L0!1<Rv;aA14C614N;L- Z 06'4H * 1 Q A'=>150&?>35+'z=Š'9k#LR$uc;L0&1NWA414C61N
D'NW.;N6N61<'NL$uS’;LHC|06'zD'VD;aD'zD14NWC6;L06-q?IH'U8+'4H<D119A414CM1V}[150&+-“HWp+ -9;L0!1FH<;3<'C6?>A41$
JG$&%('* ) '+-B.0!143<06'4-'9.'406'q=h;L0; * 'z= * +<='40X1,8+<1 * ?>;LHC6;VD; * 'D'9;=>;L-9;LHC61 * 15HC6?>D1”H<+A4;C6150ŽD;Vb4K9.14N6?!*4) 14_ ;NX0!;L'?>N`.;='7N|+'9.14NM?*4) 'z_ 1;v{!1435'0v10!;N•+<=hC•'D1FH<;N6N6;a-9;N|-q1A4;C6150$
– -.0!?-9?01F0!;N|+<=>C|'zD1$
—G$W˜ '_ 1
D'zD14N@D14?>N@A4;C61502;No™ŒšL›œ…;‚™LšŒ›[4O * 'D'
+- * 1<H4C6;LH<D1 * '06' * C6;L0!;N,D;A<?hD'-9;LH4CM;
150!D;LH'D14NŒ$d 'z_ 1oNM;FN|' Z ;,1Hp+ -q;L0!1dD; * '40M' * C6;L0!;NUD; * 'D'…A4;CM150$d˜' Z ;•‹N6;d'4.G;LH'N
8:+<;91ž<p+ =>C6?-91 * '406' * CM;L0WD; * 'zD'@+-„@
p; Ÿ> <Ÿ$a‰a;N6;!{6'Œ‹N6;.;L0 * 15060!;L0N6?-ˆ+<=>C|'H<;L'4-9;LHC6;14N
D14?>N`A4;CM150!;NW34;L0M'4H<D1”+-¡C6;L0 * ;?0!1@A;C6150a™ŒšL›[¢ * 15-jCM15D14N14N`;=>;L-9;LHC614NXD;A<?hD'-9;LH4CM;
150!D;LH'D14NŒ$
£G$&%('* ) '¤+-g.0!14350M'4-'i8+<;
0!; * ; Z ' * 15-q1
;LHC|06'D'¤D1?hN@A;C6150!;Ni™œ…;‚™LiD;fHp+ -9;L0214N
?IHC6;?0!14NŒO * 15-jC•'4-'4H¥<14N9›œU;@›[4O0!;N|.G; * C6?>A'4-q;LH4C6;4$ – -7.0!?-'@'NM15-'7D14Na;=>;L-9;LH4CM14N
D;™L * +Œ{14N;LH<D;L0!;* ) 14NX;N6C '_ 19;L-¦™œ$v§¨150&;ƒ<;L-.<=>1P
© x 15HC6;Š<p+ D19D;F™œzPvbªnTJž#«#¬£
© x 15HC6;Š<p+ D19D;F™LPvb4Kž#LK­n5J«£4®’¯4¯’bzn]##¬b
© ˜<15-'9° #LK±‚£4®W±‚¯4¯W±‚bKW±‚b4KW±ª#4#
¯G$&%('* ) '@+-².0!143506'-'@.'406',=>;L0V+-²HWp+ -9;L0!1i0!;L'=v;,+-'@-'C|02?h‘7D;FJ,³fJ@D;FHp+ -9;L0214N
0!;L'?>NL$v§¨;N68+<?>N|'40&NM;a1FHWp+ -9;L0!1=>?>D1@;N6C7p' H'-'C|02?h‘a;a;L-´8:+<;9.14N6?!*4) 14_ ;NŒ$
®G$Wc;L0F+-7'‚-'C|0!?>‘ Q #LK@³¬JRD;fHWp+ -9;L0!1NF?HC6;?0!14NLO * '= * +<=I'0@;i?-.0!?-9?0d'‡N615-'D14N
;=h;L-q;LH4C61NWD;VC61<D'N`'zNµ=>?H¥'Na;aN61<-'9D;aC61<D14NW14N;=h;L-q;LH4C61NL$
#LKG$Wc;L0a+-'@-'C•0!?>‘ˆD; * '406' * C6;L02;NaD;[email protected]#LKG$Vc;L0V+-BA;C6150D;d#LK * '406' * C6;L0!;NL$ – -U‹
.0!?-9?0XC615D'zNV'N`=>?H¥'NU15H<D;A4;C61<0`'4.'0!; * ;H'F-'zC|0!?>‘4$ x 'NM1F1,A4;C6150XH '_ 1@;N6CM;!{2',H'
-'C|0!?>‘4O<?-.0!?-9?0a-9;LH<N|'z34;L- * 15-“;NMN|'9?H}¶1<06-'*4) '_ 1~$
#
#4#$&%('* ) 'i+-·.0!143506'-'…8:+<;d0!; * ; Z '‡14NA'=>150!;ND'zNFA4;LH<D'zND;oJf.0215D+<C61N;L-lki=>14{6'N
D?hNMC6?H4C|'zNvH<14Nv-9;N6;NuD;¨{6+H¥<1O•{2+<=¥<1U;E'z3414N6C61;`'406-'z‘;LH<;v;N6N6;NuA'=>150!;N;L-žk`-'zC|0!?>‘;N
D?hNMC6?H4C|'zNa;L-B8:+<; * 'zD',=h?H¥'…0!;L.0!;N6;LHC6;F+-¦.0!1<D+<C61@; * 'D' * 14=+H'…0!;L.0!;N6;LHC6;+=h1{2'G$ x '= * +<=h;9;a?-.0!?-'GP
©­¸ C614C|'=A4;LH<D?>D1,D; * 'D'7.0!15D+<CM1;L- * 'D'9=>1{2'H<17C|0!?-9;N6C|02;4Y
© 1C614C|'z=A4;LH<D?>D1,D; * 'D'.0215D+<C617;L-“C61<D'N`'NW=>1{2'NWH<1,C|0!?-9;N6C•0!;4Y
© 1C614C|'z=A4;LH<D?>D1,;L- * 'D'q=h1{2'9H<1C•0!?-9;N6C|0!;4$
#LbG$ x 15H<N6?>D;L0!;a'9-'C|0!?>‘a¹ªD;Vºw#&³”»¤#W;a'9-'C|02?h‘a¼žD;aº½ba³F»ib$ x '= * +<='40&19.0!1<D+<C61
D;y¹’.G150W¼7$ – H<? * ?'=-9;LHC6;VN 'z_ 1ˆ=>?>D14N`ºw#4¾v»¤#4¾uº½b¾u»ibO ¸ NW;=>;L-9;LHC614N&D'NW-'zC|0!?>‘;N
¹’;V¼wNp1 D;A;L-“N6;L0&=>?>D14NaN6;a1F.0215D+<C61q}¶150.14N6NŒ¿ p A;=¶O~15+,N6;!{6'O<N6;9»
#&°’º½b$
#LkG$&%('‘;L0X+-¦.0!14350M'4-',.'406'7=h;L0a+-BA;C6150D;”#ŒK4KF.G14N6?!*4) 14_ ;NUD1@C6?.1 * '406' * C6;L0$ ¸ A4;C6150
* 15H4C;Lp -²Aµp' 0!?'NF.'='ŒA:0M'N9D;oH<1
-‚zp' ƒ5?-91ª#LK…=>;C|06'NNM;L.'406'D'N,.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zN|RY
?>?[$XN '_ 1‚C|0Œ;Ù N * 14=+H'NLP’' * 14=+H'T#‡N6?>35H<?ÚÁ * '½šL×Û:Ü4›[šÝÞY' * 14=+H'ªbP¬NM?h3<H<?ßÁ * '
™LÖà›â4á ã ÖàÜÝY;V' * 14=+H',k9N6?>35H<?ÚÁ * '…ä4š ã•ã!⠛[ÜÝY
?>?>?¶$N6;4Oµ.G150U;ƒ5;L-7.<=h1~O&1fC6?-9;f#LK…C6;A4;@n‡;L-.'C6;NLObiA5?>C<p1 0!?'N;dJiD;L060214C|'N'1
C615D1~O5;LHC '_ 1,'V=>?H¥'i#LK9D'7-'C|0!?>‘ * 15HC6;L0Up' 14NN6;35+<?H4CM;N`D'D1NLPunTb’JG$
b
Q * R – -.0!?-9?0P
?[$S]-'zC|0!?>‘aD;ˆ0!;N•+<=hC•'D14NLO<?H<D? * '4H<D1o'UN6?>C|+'*4) 'z_ 19Á(H'=D; * 'D'9C6?-9;4$
?>?[$ ¸ C6?-9;V8+<;aC6;A4;V-'z?hNŒP
S9$W;L-7.'C6;N
å $WA<?>C5p1 0!?'N
x $&D;L0M0!14C|'N
;V'98:+'H4C6?>D'D;4$
?>?>?¶$1FHWp+ -9;L0!1D;&{!14341NW8:+<; * 'zD'9C6?-9;ˆ.'0!C6? * ?.15+$
k
Download

Lista de Exerc"$cios - (4) 1. FaAca um programa que leia um vetor