Posts by Juciano Cardoso • 41 points
3 posts
-
2
votes2
answers1700
viewsA: Separating integer by character
I’ve done this job for your problem: void desmembrar(int num, int *array){ int i=0, div = 10, prediv = 1, numchar = 0; while(num - numchar){ int aux = num % div; int dif = numchar; numchar = aux;…
canswered Juciano Cardoso 41 -
1
votes4
answers3096
viewsA: recursive superfatorial problem
Practically what the user2856432 spoke only that in a more compact way: int fat(int val){ if(!val) return 1; else return val * fat(val-1); } int sfat(int val){ if(!val) return 1; else return…
-
1
votes4
answers872
viewsA: I need different ways to rearrange characters within a string, how do I do that?
Once I had to solve a similar problem in C, follow what I did: #include <stdio.h> #include <stdlib.h> #include <string.h> //retonra o tamanho de uma string delimitada por '\0',…