Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char a[101],*b,c[101]="";
  9. cin.get(a,101);
  10. b=strtok(a," ");
  11. while(b)
  12. {
  13. if(b[0]=='C' && b[strlen(b)-1]=='.')
  14. strcat(c,"COLEGIUL");
  15. else if(b[0]=='L' && b[strlen(b)-1]=='.')
  16. strcat(c,"LICEUL");
  17. else if(b[0]=='N' && b[strlen(b)-1]=='.')
  18. strcat(c,"NATIONAL");
  19. else if(b[0]=='T' && b[strlen(b)-1]=='.')
  20. strcat(c,"TEORETIC");
  21. else
  22. strcat(c,b);
  23. strcat(c," ");
  24. b=strtok(NULL," ");
  25. }
  26. cout<<c;
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement