anus.


SUBMITTED BY: Guest

DATE: Oct. 25, 2014, 2:22 p.m.

FORMAT: Text only

SIZE: 438 Bytes

HITS: 968

  1. char *change(char *str)
  2. {
  3. char *temp;
  4. int i=0, j=0, k=0;
  5. temp=(char*)malloc(strlen(str)*9+1);
  6. while(str[i]!=0)
  7. {
  8. while(str[i]&&str[i]==' ')i++;
  9. while(str[i]&&str[i]!=' ')
  10. {
  11. for(j=0;j<(str[i]-'0');j++)
  12. {
  13. temp[k++]=str[i];
  14. }
  15. i++;
  16. }
  17. temp[k++]='-';
  18. }
  19. temp[--k]='\0';
  20. לא מצאתי צורך להשלים פה.
  21. return temp;
  22. }

comments powered by Disqus