Programacion En Tiempo Real

Páginas: 2 (398 palabras) Publicado: 27 de noviembre de 2012
#include<conio.h>
#include<stdio.h>
int x,n,op;
int Imprimir();
int Alta();
int Buscar();
int eliminar();
struct dato
{
char nom[20][20];
char edi[20][20];
char autor[20][20];char ano[20][20];
}
datos;
Alta()
{
clrscr();
n=n+1;
printf("NOMBRE DEL LIBRO:\n");
scanf("%s",&datos.nom[n]);
printf("EDITORIAL DEL LIBRO: \n");
scanf("%s",&datos.edi[n]);printf("AUTOR DEL LIBRO:\n");
scanf("%s",&datos.autor[n]);
printf("FECHA DE LANZAMIENTO:\n");
scanf("%s",&datos.ano[n]);
getch();
}
int Imprimir()
{
clrscr();
gotoxy(15,2);printf("NOMBRE:");gotoxy(30,2);printf("EDITORIAL:");
gotoxy(45,2);printf("AUTOR:");
gotoxy(60,2);printf("FECHA:");
for (x=1;x<=n;x++)
{
gotoxy(3,4+(2*x));printf("LIBRO: %d",x);gotoxy(15,4+(2*x));printf("%s",datos.nom[x]);
gotoxy(30,4+(2*x));printf("%s",datos.edi[x]);
gotoxy(45,4+(2*x));printf("%s",datos.autor[x]);
gotoxy(60,4+(2*x));printf("%s",datos.ano[x]);
getch();
}}
int Buscar()
{
clrscr();printf("ESCRIBE EL -NUMERO- DEL LIBRO QUE QUIERES BUSCAR: ");
scanf("%d",&x);
gotoxy(15,3);printf("NOMBRE:");
gotoxy(30,3);printf("EDITORIAL:");
gotoxy(45,3);printf("AUTOR:");gotoxy(60,3);printf("FECHA:");

gotoxy(3,4+(2*x));printf("LIBRO: %d",x);
gotoxy(15,4+(2*n));printf("%s",datos.nom[x]);
gotoxy(30,4+(2*n));printf("%s",datos.edi[x]);gotoxy(45,4+(2*n));printf("%s",datos.autor[x]);
gotoxy(60,4+(2*n));printf("%s",datos.ano[x]);
for (x=1;x<=n;x++)
getch();
}
int eliminar()
{
clrscr();
printf("ESCRIBE EL NUMERO DEL LIBRO A ELIMINAR: ");
scanf("%d",&x);gotoxy(15,2);printf("NOMBRE:");
gotoxy(30,2);printf("EDITORIAL:");
gotoxy(45,2);printf("AUTOR:");
gotoxy(60,2);printf("FECHA:");

gotoxy(3,4+(2*x));printf("LIBRO: %d",x);gotoxy(15,4+(2*n));printf("%s",datos.nom[n]);
gotoxy(30,4+(2*n));printf("%s",datos.edi[n]);
gotoxy(45,4+(2*n));printf("%s",datos.autor[n]);
gotoxy(60,4+(2*n));printf("%s",datos.ano[n]);
for (x=1;x<=n;x++)
getch();
}...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programacion En Tiempo Real
  • Programacion en tiempo real
  • Teoria de grupos- programacion en tiempo real
  • Dfd En Tiempo Real
  • Sistemas De Tiempo Real
  • 15 RELOJ TIEMPO REAL
  • Diseño de software de tiempo real
  • tiempo real t1

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS