CENTRO UNIVERSITARIO UAEM
ATLACOMULCO
LICENCIATURA EN
INGENIERÍA EN COMPUTACIÓN
NOMBRE DEL DOCENTE:
INGENIERO.
HÉCTOR CABALLERO HERNÁNDEZ
NOMBRE MATERIA:
AUTÓMATAS Y LENGUAJES FORMALES
NOMBRE DE LA ALUMNA:
HEIVILINA PÉREZ ARIAS
GRUPO:
ICO-19
TURNO:
MATÚTINO
TRABAJO A ENTREGAR:
CODIGO EN
C++ PARA REALIZAR OPERACIONES DE UNION Y CONCATENACION
FECHA DE ENTREGA:
MAYO DE 2015.
CODIGO EN C++ PARA REALIZAR OPERACIONES DE UNION Y
CONCATENACION
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
double
n,x[20];
cout<<"\tPROGRAMA PARA LA
CONCATENACION Y UNION DE PUROS NUMEROS"<<endl;
cout<<"___________________________________________________"<<endl;
cout<<"Cuantos numeros desea
ingresar para A:";
cin>>n;
cout<<"*Dame datos uno por uno
de la primera seccion(no ingresar E):"<<endl;
cout<<"*Favor de ingresar al
pincipio un numero mayor a 1:"<<endl;
for
(int i=1; i<=n ; i++){
cout
<< "\n\n\t Numero" << ": ";
cin >> x[i];
}
cout<<"___________________________________________________"<<endl;
double a;
double l[20];
cout<<"Cuantos numeros desea
ingresar para B:";
cin>>a;
cout<<"*Dame dato por dato de
la segunda seccion (no ingresar E):"<<endl;
cout<<"*Favor de ingresar al
pincipio un numero mayo a 1:"<<endl;
for(int
j=1;j<=a;j++){
cout<<"\n\n\tNumero"<<":";
cin>>l[j];
}
cout<<"____________________________________________________"<<endl;
cout<<"LA
UNION ES:"<<endl;
for(int
i=1;i<=n;i++){
cout<<x[i]<<"\t";
}
for(int
j=1;j<=a;j++){
cout<<l[j]<<"\t";
}
cout<<endl;
cout<<"_______________________________________________________"<<endl;
cout<<"LA CONCATENACION
ES:"<<endl;
for(int
i=1;i<=n;i++){
for(int
j=1;j<=a;j++){
cout<<l[j]<<x[i]<<" ";
}
}
return 0;
}
No hay comentarios:
Publicar un comentario