Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Prescurtat(char s[])
- {
- int i,ad, j, n = strlen(s) - 1;
- char t[30];
- for(i = 0; i <= n; ++i)
- {
- if(i == 0 || (s[i - 1] == ' ') && strchr("CLNT", s[i]))
- {
- j = i;
- while(s[j] != ' ')
- ++j;
- if(s[i] == 'C')
- strcpy(t,"COLEGIUL");
- else
- if(s[i] == 'L')
- strcpy(t,"LICEUL");
- else
- if(s[i] == 'N')
- strcpy(t, "NATIONAL");
- else
- strcpy(t, "TEORETIC");
- strcpy(t + strlen(t), s + j);
- strcpy(s + i, t);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement