Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- char a[101],*b,c[101]="";
- cin.get(a,101);
- b=strtok(a," ");
- while(b)
- {
- if(b[0]=='C' && b[strlen(b)-1]=='.')
- strcat(c,"COLEGIUL");
- else if(b[0]=='L' && b[strlen(b)-1]=='.')
- strcat(c,"LICEUL");
- else if(b[0]=='N' && b[strlen(b)-1]=='.')
- strcat(c,"NATIONAL");
- else if(b[0]=='T' && b[strlen(b)-1]=='.')
- strcat(c,"TEORETIC");
- else
- strcat(c,b);
- strcat(c," ");
- b=strtok(NULL," ");
- }
- cout<<c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement