Documentos de Académico
Documentos de Profesional
Documentos de Cultura
*/
#include<iostream>
#include<iomanip>
#include<conio.h>
using namespace System;
using namespace std;
void main()
{
int K[15];
int P;
cout<<"\n Cuantas posiciones tiene el arreglo? (maximo 15) ";
cin>>P;
for(int i=0; i<=P-1; i++)
{
cout<<"\n K["<<i+1<<"] =";
cin>>K[i];
}
float SUMADATOS=0;
cout<<"\n Impresion del arreglo";
for (int y=0; y<=P-1; y++)
{
SUMADATOS=SUMADATOS+K[y];
cout<<"\n\n K["<<y+1<<"]= "<<K[y];
}
cout<<"\n\n La suma de los datos es: "<<SUMADATOS;
getch();
K[1] =12
K[2] =5
K[3] =-9
K[4] =6
K[1]= 12
K[2]= 5
K[3]= -9
K[4]= 6