#include <stdio.h>
#include <ctype.h>
#define COD_ID 7
int verificaCodigo(char nome[]){
int i, flag=1;
for(i=0;i<COD_ID;i++){
if(i<3){
flag=0;
break;
}
}else{
flag=0;
break;
}
}
}
return flag;
}
int main(int argc, char *argv[]) {
printf("%d\n", verificaCodigo
("ABC1234")); //1 printf("%d\n", verificaCodigo
("1BC1234")); //0 printf("%d\n", verificaCodigo
("AB11234")); //0 printf("%d\n", verificaCodigo
("QQQ9999")); //1 printf("%d\n", verificaCodigo
("123ABCD")); //0 printf("%d\n", verificaCodigo
("abc1234")); //1 printf("%d\n", verificaCodigo
("aBc9999")); //1 printf("%d\n", verificaCodigo
("a0b1234")); //0 return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgojZGVmaW5lIENPRF9JRCA3CgppbnQgdmVyaWZpY2FDb2RpZ28oY2hhciBub21lW10pewogICAgaW50IGksIGZsYWc9MTsKCiAgICAgICAgZm9yKGk9MDtpPENPRF9JRDtpKyspewogICAgICAgIGlmKGk8Myl7CiAgICAgICAgICAgIGlmKCFpc2FscGhhKG5vbWVbaV0pKXsKICAgICAgICAgICAgICAgIGZsYWc9MDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfWVsc2V7CiAgICAgICAgICAgIGlmKCFpc2RpZ2l0KG5vbWVbaV0pKXsKICAgICAgICAgICAgICAgIGZsYWc9MDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIHJldHVybiBmbGFnOwp9CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKSB7CiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiQUJDMTIzNCIpKTsgLy8xCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiMUJDMTIzNCIpKTsgLy8wCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiQUIxMTIzNCIpKTsgLy8wCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiUVFROTk5OSIpKTsgLy8xCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiMTIzQUJDRCIpKTsgLy8wCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiYWJjMTIzNCIpKTsgLy8xCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiYUJjOTk5OSIpKTsgLy8xCiAgICBwcmludGYoIiVkXG4iLCB2ZXJpZmljYUNvZGlnbygiYTBiMTIzNCIpKTsgLy8wCglyZXR1cm4gMDsKfQo=