Untitled
Never
#include<iostream> #include<fstream> using namespace std; void menu(int &op) { cout<<"SEGIP"<<endl; cout<<"1.- INGRESAR USUARIO:"<<endl; cout<<"2.- REGISTRAR LICENCIAS DE USUARIOS:\n"; cout<<"3.- MOSTRAR USUARIO:"<<endl; cout<<"4.- GUARDAR USUARIO:"<<endl; cout<<"5.- BUSCAR USUARIO:"<<endl; cout<<"0.- SALIR:"<<endl; cout<<"INGRESAR OPCION:"<<endl; cin>>op; } void mostrar(string nom[],string ap[],string am[],int ci[],int top) { cout<<"NRO\t\t NOMBRE\t\t CI\t\t AP\t\t AM"<<endl; for(int i=0;i<top;i++) { cout<<(i+1)<<"\t\t"<<nom[i]<<"\t\t"<<ci[i]<<"\t\t"<<ap[i]<<"\t\t"<<am[i]<<endl; } } void regitrar(string nom[],string ap[],string am[],int ci[],int &top) { cout<<" NOMBRE:"; cin>>nom[top]; cout<<"APELLIDO PATERNO:"<<endl; cin>>ap[top]; cout<<"APELLIDO MATERNO:"<<endl; cin>>am[top]; cout<<" CI:"<<endl; cin>>ci[top]; top++; mostrar(nom,ap,am,ci,top); } void licencias(string nom[],string ap[],string am[],int ci[],int &top,int lice[]) { cout<<" NOMBRE:"; cin>>nom[top]; cout<<"APELLIDO PATERNO:"<<endl; cin>>ap[top]; cout<<"APELLIDO MATERNO:"<<endl; cin>>am[top]; cout<<" CI:"<<endl; cin>>ci[top]; top++; mostrar(nom,ap,am,ci,top); } void guardar(string nom[],string ap[],string am[],int ci[],int top) { ofstream crear; crear.open("lista.txt"); crear<<"****LISTA DE CLIENTES****"<<endl; crear<<"NRO\t\t NOMBRE\t\t CI\t\t AP\t\t AM"<<endl; for(int i=0;i<top;i++) { crear<<(i+1)<<"\t\t"<<nom[i]<<"\t\t"<<ci[i]<<"\t\t"<<ap[i]<<"\t\t"<<am[i]<<endl; } crear.close(); } void bampos(int &band, int &pos, int top,int ci[]) { int cib; cout<<"INGRESE CI BUSCAR:"; cin>>cib; for(int i=0; i<top;i++) { if(cib == ci[i]) { band++; pos=i; } } } void buscar(string nom[],string ap[],string am[],int ci[],int top) { int band=0,pos=0; bampos(band, pos, top,ci); //////// if(band>0) { cout<<"USUARIO REGISTRADO!!!"<<endl; cout<<"NOMBRE:"<<nom[pos]<<endl; cout<<"APELLIDO PATERNO:"<<ap[pos]<<endl; cout<<"APELLIDO MATERNO: "<<am[pos]<<endl; cout<<"CI"<<ci[pos]<<endl; } else { cout<<"USUARIO NO REGISTRADO!!!"<<endl; regitrar(nom,ap,am,ci,top); mostrar(nom,ap,am,ci,top); } } void eliminar (string nom[],string ap[],string am[],int ci[],int &top) { int b=0,p=0; bampos(b,p,top,ci); if(b>0) { for(int j=p;j<top;j++) { nom[j]=nom[j+1]; ci[j]=ci[j+1]; ap[j]=ap[j+1]; am[j]=am[j+1]; } top--; cout<<"usuario eliminado!!!"<<endl; } else { cout<<"usuario no registrado!!!"<<endl; } } int main() { int top=6; string nom[100]; string ap[100]; string am[100]; int lice[100]; int edad[100]={10,18,20,30,45,60}; int ci [100]={5555,2222,7777,4444,56655,4554548}; int op; do { menu(op); switch(op) { case 1: { regitrar(nom,ap,am,ci,top); } break; case 2: { licencias(nom,ap,am,ci,top,lice); } break; case 3: { mostrar(nom,ap,am,ci,top); } break; case 4: { guardar(nom,ap,am,ci,top); } break; case 5: { buscar(nom,ap,am,ci,top); } break; case 6: { } break; case 7: { } break; } } while(op!=0); }
Raw Text
-
NEW🔥 UPDATED🔗 CP😈😏 FOLDERS📁 500 VIDEOS
13 min ago
-
TRANSANDO GOSTOSO COM A MORENA MAIS FODA DE CURITIBA (LIS MODEL)
14 min ago
-
Fitspresso For Coffee Loophole
28 min ago
-
C_🔥P D000D latest
37 min ago
-
What are the rapid results of keto ACV gummies?
38 min ago
-
https://www.facebook.com/BloomCBDOfficial/
39 min ago
-
"Why Does It Smell Like Sex?" Slutty Wife Caught With Another Man - Lucky Anne - TouchMyWi
44 min ago
-
Untitled
50 min ago
-
https://www.facebook.com/FitSpressoWeightLossCapsule/
58 min ago
-
Keto Gummies For Weight Loss: Safety And Alternatives
59 min ago