Posts by Gustavo Sutter • 31 points
3 posts
-
2
votes2
answers3540
viewsA: Factor factor in python,
For the factorial problem it is quite simple to solve using a recursive function: def fatorial(n): if n<=1: return 1 else: return n*fatorial(n-1)…
-
0
votes2
answers5011
viewsA: Delete a struct record
This is the simplest solution: void remove(){ int n_remover; exibe() printf("Digite o numero de quem voce quer remover"); scanf("%d",&n_remover); p[d] = p[num-1] //coloca o ultimo no lugar do q…
canswered Gustavo Sutter 31 -
1
votes1
answer175
viewsA: Help with list and file
You can do as in this code below, passing to the function the first node/cell of the linked list void salva(celula *c){ FILE *arquivo = NULL; celula *p = c; arquivo = fopen("Arquivo.txt","w");…