Advertisement
apl-mhd

fourth mt

Jun 22nd, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  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.     int  len = id.length();
  13.     for(int i=0; i<len; i++){
  14.  
  15.  
  16.         if((id[i] <= 'z' && id[i] >= 'a')){
  17.  
  18.             cout<<"Not Accept";
  19.             exit(0);
  20.         }
  21.  
  22.     }
  23.  
  24.     if(id[len-1] == '.'){
  25.  
  26.  
  27.         cout<<"Not Accept";
  28.         exit(0);
  29.  
  30.     }
  31.  
  32.     cout<<"Accept";
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement