Gerenciador de biblioteca por listas

Disponível somente no TrabalhosFeitos
  • Páginas : 13 (3167 palavras )
  • Download(s) : 0
  • Publicado : 21 de novembro de 2012
Ler documento completo
Amostra do texto
//NOME: FERNANDO MALUF PENNA
//
//VALOR DO PROJETO: ___________PONTOS

#include
#include
#include
#include
#include

struct no // struct para rodar os livros
{
char titulo[30];
char autor[20];
char genero[10];
int cod_ind;
int d,m,a;
int disponiveis;
struct no *prox;
}; //criar as variaveis dos livros

struct cad_clientes
{char nome[50];
int codigo;
struct no *lista_de_livros_pegos;
struct cad_clientes *prox;
};
void mostrar_lista_de_livros_alugados_por_dado_cliente(struct no*aux)
{
printf("\n LIVROS ALUGADOS: ");
while(aux->prox != NULL)
{
printf(" %s ,",aux->titulo); //ele mostra o livro e coloca uma virgulaaux = aux->prox;
}
printf(" %s.\n",aux->titulo); //ele coloca "." para o ultimo livro alugado
}
//****************************************************MOSTRANDO A LISTA
void mostrar_lista(struct no*lista)
{
if(lista == NULL)
{
system("cls");
printf("\nListra de livros VAZIA\n\n");printf("Presione qualquer tecla para continuar...");
}
else{
printf("\n\nLISTA DE LIVROS(cod/titulo,autor,genero,disponiveis)\n\n");printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,187);
while(lista!=NULL)
{
printf("%c ",186);
printf("%4d ",lista->cod_ind);
printf("%30s ",lista->titulo);printf("%20s ",lista->autor);
printf("%10s ",lista->genero);
printf("%3d ",lista->disponiveis);
printf("%c\n",186);
lista = lista->prox;
}printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",200,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,188);
}
}
//***************************************************************LISTA DE CLIENTES
void mostrar_lista_de_clientes(structcad_clientes*cliente)
{
if(cliente == NULL)
{
system("cls");
printf("Lista de clientes VAZIA\n\n");
printf("Presione qualquer tecla para continuar...");
}
else
{
printf("\nCLIENTES(cod,nome):\n\n");printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,187);
while(cliente != NULL)
{
printf("%c %3d %50s %c\n",186,cliente->codigo,cliente->nome,186);
cliente =cliente->prox;
}
printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",200,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,188);...
tracking img