Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #define N 301
- using namespace std;
- char s[51],t[101], cuv[4][10]={"COLEGIUL", "LICEUL", "NATIONAL", "TEORETIC"};
- char *p, aux[51];
- int n;
- int main()
- {
- cin.getline(s,50);
- p=strtok(s," ");
- while(p)
- {
- if(strchr(p,'.'))
- {
- if(p[0]=='C') strcpy(aux,cuv[0]);
- else if(p[0]=='L') strcpy(aux,cuv[1]);
- else if(p[0]=='N') strcpy(aux,cuv[2]);
- else if(p[0]=='T') strcpy(aux,cuv[3]);
- else strcpy(aux,p);
- }
- else strcpy(aux,p);
- if(n!=0)strcat(t," ");
- strcat(t,aux);
- n++;
- p=strtok(NULL," ");
- }
- cout<<t;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement