rotti321

Acronime CT, CN, UNIV

Oct 20th, 2021
562
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7.     char cn,ct,univ,a[256];
  8.     cin.getline(a,256);//CT CN UNIV....
  9.     if(a[0]=='C'&& a[1]=='T'){
  10.         a[9]='\0'; ///stabilim pe pozitia 9 sfarsitul sirului de caractere
  11.         cout<<"Colegiul Tehnic "<<a+3;
  12.     }
  13.     if(a[0]=='C'&& a[1]=='N'){
  14.         cout<<"Colegiul National "<<a+3;
  15.     }
  16.     if(a[0]=='U'&& a[1]=='N'){
  17.         cout<<"Universitatea "<<a+5;
  18.     }
  19.    
  20.     return 0;
  21. }
RAW Paste Data