You are on page 1of 2

#define MAXR 50

#include<conio.h>
#include<iostream.h>
#include<stdio.h>
struct Registro
{
long cel;
char nombre [30];
char nick[15];
};
struct reg_msj
{
void registros(Registro rg[]);
//void mensajes(Registro rg[]);
//void cons_ind (Registro rg[]);
//void cons_msj_inst(Registro rg[]);
void main()
{
char op;
Registro rg[MAXR];
clrscr();
cout<<" *******************************************\n";
cout<<" *******************************************\n";
cout<<" ***********APLICATIVO DE MENSAJES**********\n";
cout<<" ** **\n";
cout<<" ** MENU - OPCIONES **\n";
cout<<" ** **\n";
cout<<" ** 1. REGISTRO **\n";
cout<<" ** 2. MENSAJES ESCRITOS **\n";
cout<<" ** 3. CONSULTA INDIVIDUAL **\n";
cout<<" ** 4. CONSULTA MENSAJES INSTANTANEOS **\n";
cout<<" ** 5. SALIR **\n";
cout<<" **_______________________________________**\n";
cout<<" **_______________________________________**\n";
cout<<" ** **\n";
cout<<" ** [ ] OPCION **\n";
cout<<" ** **\n";
cout<<" ** **\n";
cout<<" *******************************************\n";
cout<<" *******************************************\n";
gotoxy (11,15);
cin>>op;
if (op=='1')
registros(rg);
if(op=='2')
mensajes (rg);
// else
// {
// if (op=='3')
// cons_ind(rg);
// else
// {
// if (op=='4')
// cons_msj_inst;
// }
// }
// }
getch();
}
//***PANTALLA PARA REGISTROS***//
void registros(Registro rg[])
{
char opt;
int i=0;
clrscr();
do
{
i++;
clrscr();
cout<<" *******************************************\n";
cout<<" *******************************************\n";
cout<<" ***********REGISTRO DE APLICACION**********\n";
cout<<" ** **\n";
cout<<" ** MENSAJES GRATIS **\n";
cout<<" ** **\n";
cout<<" ** Nombre : **\n";
cout<<" ** Nick : **\n";
cout<<" ** #Celular: 0- **\n";
cout<<" ** **\n";
cout<<" ** Reg.Nº: **\n";
cout<<" **_______________________________________**\n";
cout<<" **_______________________________________**\n";
cout<<" ** **\n";
cout<<" ** Hacer otro ingreso? S/N [ ] **\n";
cout<<" ** **\n";
cout<<" ** **\n";
cout<<" *******************************************\n";
cout<<" *******************************************\n";
gotoxy(15,7);
cin>>rg[i].nombre;
gotoxy(15,8);
cin>>rg[i].nick;
gotoxy(17,9);
cin>>rg[i].cel;
gotoxy(35,11);
cout<<(i);
do
{
gotoxy(37,15);
cin>>opt;
if (opt!='s'&& opt!='n')
{
// gotoxy(12,21);
cout<<" ERROR! DEBE INGRESAR s/n";
}
}while(opt!='s'&& opt!='n');
}while(opt=='s'&& i<MAXR);
getch();
}

You might also like