apl-mhd

third mt

Jun 22nd, 2019
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<cstdio>
  2. #include <string>
  3. #include <iostream> //cout, cin
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8.  
  9.     string id;
  10.     cin>>id;
  11.  
  12.  
  13.     if(!(id[0] <=  '9' && id[0] >='0')){
  14.  
  15.         cout<<"Not Accept 1";
  16.         exit(0);
  17.     } else if (!(id[1] <= 'Z' && id[1] >= 'A')){
  18.  
  19.         cout<<"Not Accept 2";
  20.         exit(0);
  21.     }
  22.  
  23.     else if ((id[2] <= 'Z' && id[2] >= 'A')){
  24.  
  25.         cout<<"Not Accept 3";
  26.         exit(0);
  27.     }
  28.  
  29.     else if (!((id[3] <= 'Z' && id[3] >= 'A')  || (id[3] <= '9' && id[3] >= '0'))){
  30.  
  31.         cout<<"Not Accept 4";
  32.         exit(0);
  33.     } else{
  34.  
  35.         cout<<"Accept";
  36.  
  37.     }
  38.  
  39.  
  40.    
  41.     return 0;
  42. }
RAW Paste Data