Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. return 0;
  2. system("pause");
  3.  
  4. printf("1. Adicionar nova musican");
  5. printf("2. Exibir todas as musicasn");
  6. printf("3. Sairnn");
  7. printf("Digite sua escolha: ");
  8.  
  9. scanf_s("%d", &opcao);
  10. while ((c = getchar()) != 'n' && c != EOF) {}
  11.  
  12. system("Cls");
  13. return opcao;
  14.  
  15. ElementoVarredura = Head;
  16. if (ElementoVarredura == NULL) {
  17. return;
  18. }
  19.  
  20. int contador = 1;
  21.  
  22. while (ElementoVarredura != NULL) {
  23. printf("%d.n", contador);
  24. printf("Nome: %s", ElementoVarredura->nome);
  25. printf("Artista: %s", ElementoVarredura->banda);
  26. printf("Duracao: %s", ElementoVarredura->duracao);
  27. ElementoVarredura = ElementoVarredura->prox;
  28. contador++;
  29. printf("n------------------------------------n");
  30. }
  31. printf("n");
  32. system("pause");
  33. return;
  34.  
  35. NovoElemento->nome = nome;
  36. NovoElemento->banda = banda;
  37. NovoElemento->duracao = duracao;
  38. NovoElemento->prox = NULL;
  39.  
  40.  
  41. if (Head == NULL)
  42. {
  43. Head = NovoElemento;
  44. }
  45. else
  46. {
  47. NovoElemento->prox = Head;
  48. Head = NovoElemento;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement