35 lines
743 B
C
35 lines
743 B
C
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
|
|
bool checkin(char c){
|
|
if(c >= 'A' && c <= 'Z') return true;
|
|
if(c >= 'a' && c <= 'z') return true;
|
|
if(c >= '0' && c <= '9') return true;
|
|
if(c == '_') return true;
|
|
return false;
|
|
}
|
|
|
|
bool check(char* arr){
|
|
if(arr == NULL) return false;
|
|
int p = 0;
|
|
if(arr[0] >= '0' && arr[0] <= '9') return false;
|
|
while(arr[p] != '\0' && arr[p] != '\n'){
|
|
//if(arr[p] == '\n') continue;
|
|
if(!checkin(arr[p])) return false;
|
|
p++;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
|
|
int main(){ /* is main */
|
|
char arr[22];
|
|
fgets(arr, 22, stdin);
|
|
printf(check(arr) ? "yes\n" : "no\n");
|
|
return 0;
|
|
}
|