Jump to content

menu em c


oliveira1991
 Share

Recommended Posts

include<stdio.h>


void main()

   
{   
/*struct livro {

char nome[50];
char autores[35];
float preco;
}
struct autores{
char nome[50];
char livro[100];
}*/

char opcao;
do
{ 
   printf("-----------------------");
   printf("\n\tBibioteca\t\n");
   printf("\n\n\t\t 1) Livros");
   printf("\n\n\t\t 2) Autores");
   printf("\n\n\t\t 3) Funcionarios");
   printf("\n\n\t\t 4) Sair");
   printf("\n\n\n\t\t\tOpcao: ");
   scanf("%c", &opcao);
   fflush(stdin);
   switch(opcao)
   {
   
   case'1': puts("opcao Livros"); break;
          
   case'2': puts("opcao Autores"); break;
   
   case'3': puts("opcao Funcionarios"); break;
   
   case'4': break;
   default: puts("opcao INVALIDA!!!");
   
   
   }
   getchar();
}
   while(opcao!=4);

}

aqui esta o meu menu a minha duvida é como é que vou entrar na opção livros e depois lá por um submenu para registar e pesquizar

Live for ever

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.