Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void myStrcpy(char s[], int vt, char s1[], int k)
- {
- for (int i=0; i<MAX; i++) s[i] = s1[i];
- }
- void Chuanhoa(char s[])
- {
- char cur[MAX];
- int i = 0, j = 0;
- int f = 1;
- bool first = 1;
- while (i<MAX)
- {
- if (s[i]=='.')
- {
- while (j>0 && cur[j - 1]==' ') j--;
- cur[j] = s[i];
- ++j;
- cur[j] = ' ';
- ++j;
- ++i;
- while (s[i]==' ') ++i;
- }
- else
- {
- cur[j] = s[i];
- ++j;
- ++i;
- }
- }
- for (int i=0; i<MAX; i++) s[i] = cur[i];
- }
Advertisement
Add Comment
Please, Sign In to add comment