提交记录 #200
提交时间:2024-11-12 19:44:34
语言:c
状态:Unaccepted
编译情况:编译成功
code.c: In function ‘main’:
code.c:9:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[6]’ [-Wformat=]
9 | scanf("%s",&a);
| ~^ ~~
| | |
| | char (*)[6]
| char *
固定测试点#1:
固定测试点#2:
固定测试点#3:
固定测试点#4:
附加测试点暂不可用
37【字符】自编车号
#include<stdio.h>
#include<ctype.h>
int main(){
char a[6];
int capital=0;
int result=1;
int i;
scanf("%s",&a);
if(isdigit(a[4])){
for(i=0;i<4;i++){
if(isupper(a[i])==1&&a[i]!='O'&&a[i]!='I') capital++;
else if(isdigit(a[i]));
else result=0;
}
if(capital<2) result=0;
}
else result=0;
if(result==1) printf("ok.\n");
if(result==0) printf("no.\n");
}