<html><head><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}

p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head><body><div data-externalstyle="false" dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:12pt;"><div>Hola que tal quisiera ver si me podría ayudar en un problema de Vectores o Arreglos Undimensionales. Tengo un problema el cual me dice que almacene vector el numero de peso de n empleados. Como podrán ver el tamaño del vector será el numero que introduzca en el teclado, pero no se como declarar esa instrucción, Si alguien me podría corregir lo agradecería mucho:</div><div> </div><div>#include<iostream.h><br>#include<conio.h><br>#include<stdio.h><br>#define tam ne<br>void main()<br>{<br> int ne,x;<br>   int peso[ne];<br>   cout<<"Cuantos empleados son: "<<endl;<br>   cin>>ne;<br>   for(x=1;x<=tam;x++)<br>   {<br>    cout<<"Da el peso del empleado "<<x<<endl;<br>      cin>>peso[x];<br>   }<br>   for(x=1;x<=tam;x++)<br>   {<br>    if(peso[x]<=80)<br>      {<br>       cout<<"El peso es menor o igual de 80 kg"<<endl;<br>      }<br>      else if(peso[x]>80)<br>      {<br>       cout<<"El peso del empleado "<<x<<" excede de 80 kg"<<endl;<br>      }<br>   }<br>   getch();<br>}</div><div data-signatureblock="true"><div> </div><div>Enviado con Correo de Windows</div><div> </div></div></div></body></html>