Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void menuVisualizar(char produtoBase)
- {
- printf("==============================================\n");
- printf("TODOS OS PRODUTOS BASE DISPONÍVEIS NO ESTOQUE\n");
- for(int i = 0; i>=0; i++)
- printf("==============================================\n");
- }
- int main()
- {
- int inf = 1;
- char respMenuPrinc, respSair;
- char produtoBase[55];
- produtoBase[0] = "Farinha";
- produtoBase[1] = "Ovo";
- while (inf == 1)
- {
- printf("===============================\n");
- printf("\tMenu Principal\t\n");
- printf("1. Visualizar\n");
- printf("2. Adicionar\n");
- printf("3. Remover\n");
- printf("4. Pesquisar\n");
- printf("5. Sair\n");
- printf("===============================\n");
- respMenuPrinc = getche();
- printf("\n");
- switch(respMenuPrinc)
- {
- case '1':
- menuVisualizar(produtoBase);
- break;
- case '2':
- //MenuAdicionar();
- break;
- case '3':
- //MenuRemover();
- break;
- case '4':
- //MenuPesquisar();
- break;
- case '5':
- printf("SAIR\n");
- printf("Voce tem certeza? (Y/N)\n");
- respSair = getche();
- printf("\n");
- switch (respSair)
- {
- case 'y':
- inf = 0;
- break;
- case 'Y':
- inf = 0;
- break;
- case 'n':
- inf = 1;
- system("cls");
- break;
- case 'N':
- inf = 1;
- system("cls");
- break;
- default:
- inf = 1;
- system("cls");
- }
- break; //Sai do loop
- default:
- system("cls");
- printf("Escolha uma das opcoes!\n\n");
- }
- }
- printf("Aperte qualquer tecla para continuar...\n");
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement