Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
anus.
SUBMITTED BY:
Guest
DATE:
Oct. 25, 2014, 2:22 p.m.
FORMAT:
Text only
SIZE:
438 Bytes
Raw
Download
Tweet
HITS:
968
Go to comments
Report
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;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus