Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void menu()
  5. {
  6. printf("escolha uma opcao: \n");
  7. printf("\n(1) incluir novo regristro");
  8. printf("\n(2) alterar um registro existente");
  9. printf("\n(3) excluir um registro");
  10. printf("\n(4) consultar um registro");
  11. printf("\n(5) listar todos os registros");
  12. printf("\n(6) gravar no arquivo");
  13. printf("\n(7) sair\n\n");
  14.  
  15. }
  16.  
  17. int main()
  18. {
  19. int op=0;
  20. while(op!=6)
  21. {
  22. menu();
  23. scanf("%d",&op);
  24. if(op<=0 || op>=8)
  25. {
  26. printf("\nescolha invalida! pressione um botao para tentar novamente.\n\n");
  27. system("pause");
  28. system("cls");
  29. }
  30.  
  31. system("cls");
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement