Registro en c++
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <iomanip.h>
#include <stdio.h>
#include <string.h>
structEmpleados
{
int cod;
char apell[20];
float sueldo;
}lista[1000];
void main()
{
int n, aux, aux4, aux5;
char aux2[20], aux8[20], aux6[20];
float aux3, aux9, aux7;system("color 0e");system("color 1a");system("color 2b");system("color 3c");system("color 4d");
system("color 0e");system("color 1a");system("color 2b");system("color 3c");system("color 4d");system("color 0e");system("color 1a");system("color 2b");system("color 3c");system("color 4d");
system("color 5e");system("color 6f");system("color 7a");system("color 8e");system("color 0e");
do{gotoxy(5,2); clreol(); cout<<"Ingrese numero de empleados = "; cin>>n;
}while(n<0 || n>1000);
gotoxy(15,4); cout<<" # CODIGO APELLIDOS SUELDO";gotoxy(15,5); cout<<"___________________________________________";
gotoxy(15,22); cout<<"___________________________________________";
for(int i=1; i<=n; i++)
{gotoxy(15,6+i); cout<<i<<".";
do{
gotoxy(20,6+i); clreol(); cin>>lista[i].cod;
}while(lista[i].cod<1000 || lista[i].cod>9999);
gotoxy(34,6+i);gets(lista[i].apell);
do{
gotoxy(51,6+i); clreol(); cin>>lista[i].sueldo;
}while(lista[i].sueldo<1000 || lista[i].sueldo>2000);
}
getche();clrscr();
gotoxy(15,4);cout<<" # APELLIDOS SUELDO";
gotoxy(15,5); cout<<"___________________________________________";
gotoxy(15,22); cout<<"___________________________________________";for(int i=1; i<=n; i++)
{
gotoxy(15,6+i); cout<<i<<".";
gotoxy(20,6+i); cout<<lista[i].apell;
gotoxy(45,6+i); cout<<lista[i].sueldo;
}...
Regístrate para leer el documento completo.