Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void troca(char **valores,int k,int l ,int d)
- {
- char *tmp = calloc(d,sizeof(char *));
- strcpy(tmp,valores[k]);
- strcpy(valores[k],valores[l]);
- strcpy(valores[l],tmp);
- free(tmp);
- }
- void ord(char **v, int n,int d)
- {
- int j,k,l,i;
- for(i = d-1; i >= 0; i--)
- {
- for(j = 0, l = 0; j < 10;j++)
- {
- for(k = 0; k < n;k++)
- {
- if(v[k][i] - '0' == j)
- troca(v,k,l,d);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement