<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=3><SPAN lang=ES-PR style="FONT-FAMILY: Arial"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><?xml:namespace prefix = o 
ns = "urn:schemas-microsoft-com:office:office" /><o:p>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Hola.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Creo que ya entendí lo de los arreglos… sencillamente 
cuando se declara el arreglo reservamos tantos espacios como el # que se pone 
entre los símbolos [ ]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Y la diferencia (lo que me confundía) es que para las 
cadenas uno de esos espacios se deja para el elemento nulo lo que implica que 
tenemos un espacio menos para almacenar un caracter. <SPAN 
style="mso-spacerun: yes"> </SPAN>Muchas gracias a todos por la exhaustiva 
ayuda.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Esta parte va un poco mas dirigida a Steven aunque si 
alguien tiene alguna sugerencia se acepta.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Envío acá los ejercicios para que los revisen <SPAN 
style="mso-spacerun: yes"> </SPAN>porque cuando escribí a </SPAN><SPAN 
lang=ES-PR style="FONT-SIZE: 14pt; COLOR: blue"><A 
href="mailto:ejercicioscpp@conclase.net"><FONT 
face="Times New Roman">ejercicioscpp@conclase.net</FONT></A><FONT 
face="Times New Roman"> </FONT></SPAN><FONT face="Times New Roman"><SPAN 
lang=ES-PR style="FONT-SIZE: 14pt; COLOR: black">me hicieron esta sugerencia * x 
motivo. </SPAN><SPAN lang=ES-PR 
style="FONT-SIZE: 10pt; COLOR: black"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial">Me falta el # 4 porque tengo algunas 
dudas como por ejemplo:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial">-Se supone que el usuario solo pueda 
entrar números?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial">-Que seria en este caso una cadena que 
no contiene números? Un ejemplo?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial">-Quedarían así los ejemplos que pongo 
debajo:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">  
</SPAN><U>Sin incrementar</U> <SPAN 
style="mso-spacerun: yes">   </SPAN><SPAN 
style="mso-spacerun: yes"> </SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN><SPAN 
style="mso-spacerun: yes"> </SPAN><SPAN 
style="mso-spacerun: yes"> </SPAN><SPAN 
style="mso-spacerun: yes"> </SPAN><SPAN 
style="mso-spacerun: yes">          </SPAN><U>Incrementada<o:p></o:p></U></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">   </SPAN>000111<SPAN 
style="mso-spacerun: yes">                                   
</SPAN>000111999<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">   </SPAN>0011100<SPAN 
style="mso-spacerun: yes">                                 
</SPAN>001110099<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0cm 0cm 0pt 165.75pt; TEXT-INDENT: -156.75pt; mso-list: l0 level1 lfo1; tab-stops: list 165.75pt"><SPAN 
lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"><SPAN 
style="mso-list: Ignore">00<SPAN 
style="FONT: 7pt 'Times New Roman'">                                                                                         
</SPAN></SPAN></SPAN><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial">009999999</SPAN><SPAN lang=ES-PR 
style="COLOR: black; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" 
align=left></o:p></SPAN></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" 
align=center><B style="mso-bidi-font-weight: normal"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Cap # 10<o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B 
style="mso-bidi-font-weight: normal"><U><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Ejer1<o:p></o:p></SPAN></U></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">#include 
<iostream><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">using namespace std; 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">int 
main(){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>int ArreEnteros[10], suma=0, 
mayor, menor, i;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>float 
promedio;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN></SPAN><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">cout<<"Entre 10 valores enteros para almacenar 
en el arreglo"<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>for (i=0; i<10; i++){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">       
</SPAN>cin>>ArreEnteros[i]; //lectura de cada elemento del arreglo 
(1)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">       
</SPAN>cout<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">       </SPAN>suma= 
suma+ArreEnteros[i]; //calculo de la suma (2)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">       
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Valor i: "<<i<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>promedio=float(suma)/i; //calculo de la promedio(3)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>mayor=ArreEnteros[0]; //preparando terreno para determinar max y 
min<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>menor=ArreEnteros[0];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>for (i=1; i<10; i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">       
</SPAN>if(menor>ArreEnteros[i])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">          
</SPAN>menor=ArreEnteros[i]; //calculo de la minimo (4)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">         
</SPAN></SPAN><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">else<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">          
</SPAN>if(mayor<ArreEnteros[i])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">             
</SPAN></SPAN><SPAN lang=ES-PR style="FONT-FAMILY: Arial">mayor=ArreEnteros[i]; 
//calculo de la maximo (5)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Suma total: "<<suma<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Promedio: 
"<<promedio<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Menor: "<<menor<<endl; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Mayor: "<<mayor<<endl;<SPAN 
style="mso-spacerun: yes">     </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>// 
cin.get(); //no me deja ver lo que resulta como por lo que lo sustituyo con 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                  
</SPAN>//<SPAN style="mso-spacerun: yes">  
</SPAN>getchar();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>getchar(); //por que a veces el tiempo de espera funciona con un <SPAN 
style="mso-spacerun: yes"> </SPAN>getchar() y <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>getchar();<SPAN style="mso-spacerun: yes">   </SPAN>// a veces 
hay que poner dos?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>return 1;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B 
style="mso-bidi-font-weight: normal"><U><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">Ejer2<o:p></o:p></SPAN></U></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">#include 
<iostream><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">using namespace std; 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">//variables globales<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">  </SPAN>int 
ArreInt[10]={2,1,4,3,8,7,6,5,10,9};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">//prototipo de funcines<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">  
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">void 
Ordenar(bool);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">  </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">//pfuncion principal 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">int 
main(){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>int opcion; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>for(int i=0; i<10; 
i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">cout<< "El valor 
"<<(i+1)<<" del arreglo es: 
"<<ArreInt[i]<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"Escoja c'omo ordenarlos:"<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"1-Decresientemente."<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"2-Cresientemente."<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cin>>opcion;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>switch (opcion) {<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">      </SPAN>case 1 :<SPAN 
style="mso-spacerun: yes">    </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">              
</SPAN>Ordenar((opcion-1));<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">              
</SPAN>cout<< "El arreglo ordenado decrecientemente: 
"<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">              
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
i=0; i<10; i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                 
</SPAN>cout<<ArreInt[i]<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN>getchar(); <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN>break;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>case 2 
:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN>Ordenar((opcion-1));<SPAN 
style="mso-spacerun: yes">           
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN></SPAN><SPAN lang=ES-PR style="FONT-FAMILY: Arial">cout<< "El 
arreglo ordenado crecientemente: "<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">              
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
i=0; i<10; i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                 
</SPAN>cout<<ArreInt[i]<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN>getchar();<SPAN style="mso-spacerun: yes">     
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">              
</SPAN>break;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>default 
:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">            
</SPAN>cout <<"NOT A VALID CHOICE!<SPAN style="mso-spacerun: yes">  
</SPAN>Bye ..." << endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">            
</SPAN>getchar();<SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN><SPAN 
style="mso-spacerun: yes">      </SPAN>getchar(); 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">            
</SPAN>return(-1);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">}<SPAN 
style="mso-spacerun: yes">      
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>getchar();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>return 1;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">//implementacion de funciones<SPAN 
style="mso-spacerun: yes">      
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">void Ordenar(bool orden){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>int temp; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>if (orden){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">          
</SPAN>for(int j=1; j<10; j++)<SPAN style="mso-spacerun: yes">   
</SPAN>//realiza la operacion(ciclo de abajo) n-1 veces. n # de elementos en el 
arreglo. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">          
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
i=0; i<(10-j); i++) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">             
</SPAN>if (ArreInt[i]>ArreInt[(i+1)]){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>temp=ArreInt[(i+1)];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>ArreInt[(i+1)]=ArreInt[i];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>ArreInt[i]=temp;<SPAN style="mso-spacerun: yes">  </SPAN><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>}<SPAN 
style="mso-spacerun: yes">               
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">       </SPAN>} 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      
</SPAN>else<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">          
</SPAN>for(int j=1; j<10; j++)<SPAN style="mso-spacerun: yes">   
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">          
</SPAN>for(int i=0; i<(10-j); i++) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">             
</SPAN>if (ArreInt[i]<ArreInt[(i+1)]){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN></SPAN><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">temp=ArreInt[(i+1)];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>ArreInt[(i+1)]=ArreInt[i];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>ArreInt[i]=temp;<SPAN style="mso-spacerun: yes">   
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>}<SPAN 
style="mso-spacerun: yes">             
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">/*Dicho sea de paso, me puedes decir si el DEV-C++ 
tiene una ayuda <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">  
</SPAN>interactiva como la de C++Builder. Si la tiene como 
funciona?*/<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B 
style="mso-bidi-font-weight: normal"><U><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">Ejer3<o:p></o:p></SPAN></U></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">#include 
<iostream><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">using namespace std; 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">int 
main(){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN>int suma, 
Matriz[5][5]={1,2,3,4,5,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                              
</SPAN></SPAN><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">6,7,8,9,10,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                              
</SPAN>11,12,13,14,15,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                              
</SPAN>16,17,18,19,20,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">                              
</SPAN>21,22,23,24,25};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>//mostrar matriz<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<"La matriz creada tendria la forma: "<<endl; 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
i=0; i<5; i++){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      
</SPAN>cout<<"fila["<<(i+1)<<"]-> ";<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>for(int j=0; 
j<5; j++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">         
</SPAN>cout<<Matriz[i][j]<<"<SPAN style="mso-spacerun: yes">  
</SPAN>";<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">cout<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">      
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>//determinar suma por fila y mostrar resultado<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<endl<<"La suma de los elemementos de cada fila serian: 
"<<endl; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
i=0; i<5; i++){<SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>suma=0;<SPAN 
style="mso-spacerun: yes">         
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=PT-BR style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR">for(int j=0; 
j<5; j++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR"><SPAN 
style="mso-spacerun: yes">         
</SPAN>suma=suma+Matriz[i][j];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">cout<<"fila["<<(i+1)<<"]-> 
"<<suma;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>cout<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>//determinar suma por columna y mostrar resultado<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN>cout<<endl<<"La suma de los elemementos de cada columna 
serian: "<<endl; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">   
</SPAN></SPAN><SPAN style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">for(int 
j=0; j<5; j++){<SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>suma=0;<SPAN 
style="mso-spacerun: yes">         
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN>for(int i=0; 
i<5; i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">         
</SPAN>suma=suma+Matriz[i][j];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      
</SPAN>cout<<"columna["<<(j+1)<<"]-> 
"<<suma;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      
</SPAN>cout<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>getchar();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   
</SPAN>//getchar();*/<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>return 1;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">   </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B 
style="mso-bidi-font-weight: normal"><U><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">Ejer5</SPAN></U></B><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">#include<iostream> 
//si pongo iostream.h me da un #warning This file includes<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">               
</SPAN><SPAN style="mso-spacerun: yes">    </SPAN>// at 
least one deprecated or antiquated header. Please <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>//consider using one of the 32 headers found in 
section<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>// 17.4.1.2 of the C++ standard. Examples include<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>// substituting the <X> header for the <X.h> header for 
C++<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>// includes, or <iostream> instead of the deprecated 
header<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>// <iostream.h>. To disable this warning use -Wno-deprecated. 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">                   
</SPAN>//<SPAN style="mso-spacerun: yes">    </SPAN>Por que 
ocurre?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">using namespace 
std;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">//prototipo de 
funciones<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">bool 
Palindromo(char*);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">//<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">int 
main(){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN>char 
frace[40];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN>cout<<"Entre frace: 
"<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN>cin>>frace; 
cout<<endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">    </SPAN>if(Palindromo(frace)) 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">      </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">cout<<"La frace es un 
palindromo.";<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">     </SPAN>else 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">      </SPAN>cout<<"La 
frace no es un palindromo.";<SPAN style="mso-spacerun: yes">    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">      
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>getchar();<SPAN style="mso-spacerun: yes">    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>getchar();<SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>return 1;<SPAN style="mso-spacerun: yes">  
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial">//zona de desarrollo de 
funciones<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR">bool Palindromo(char 
palabra[]){<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR"><SPAN 
style="mso-spacerun: yes">     </SPAN>int 
cont=0;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR"><SPAN 
style="mso-spacerun: yes">     </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=PT-BR 
style="FONT-FAMILY: Arial; mso-ansi-language: PT-BR"><SPAN 
style="mso-spacerun: yes">     </SPAN></SPAN><SPAN 
lang=ES-PR style="FONT-FAMILY: Arial">while(palabra[cont]!=0x00) //localiza fin 
de la cadena<SPAN 
style="mso-spacerun: yes">        
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">        
</SPAN>cont++;<SPAN 
style="mso-spacerun: yes">                    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">     </SPAN>for(int i=0; 
i<cont; i++)<SPAN style="mso-spacerun: yes">  </SPAN>//compara las ods 
cadenas(cosiderando que no hay espacios) para versi es un 
palindromo<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=ES-PR 
style="FONT-FAMILY: Arial"><SPAN 
style="mso-spacerun: yes">        
</SPAN></SPAN><SPAN lang=IT 
style="FONT-FAMILY: Arial; mso-ansi-language: IT">if(palabra[((cont-1)-i)]!=palabra[i])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=IT 
style="FONT-FAMILY: Arial; mso-ansi-language: IT"><SPAN 
style="mso-spacerun: yes">           
</SPAN></SPAN><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">           
</SPAN>return false;<SPAN style="mso-spacerun: yes">   
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">           
</SPAN>break;<SPAN 
style="mso-spacerun: yes">         
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">           
</SPAN>}<SPAN style="mso-spacerun: yes">    
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">     </SPAN>return true;<SPAN 
style="mso-spacerun: yes">  </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
style="FONT-FAMILY: Arial; mso-ansi-language: EN-US"><SPAN 
style="mso-spacerun: yes">     
</SPAN>}<o:p></o:p></SPAN></P></FONT></DIV></BODY></HTML>