char *change(char *str) { char *temp; int i=0, j=0, k=0; temp=(char*)malloc(strlen(str)*9+1); while(str[i]!=0) { while(str[i]&&str[i]==' ')i++; while(str[i]&&str[i]!=' ') { for(j=0;j<(str[i]-'0');j++) { temp[k++]=str[i]; } i++; } temp[k++]='-'; } temp[--k]='\0'; לא מצאתי צורך להשלים פה. return temp; }