这代码哪里出问题哦???
#include <stdio.h>#include <string.h>
int main()
{
int n,total = 0;
char a[4] = {'A','B','C','D'};
for(int i = 0;i < 4;i++)
{
if(strcmp('A',a[i]) == 0)
total += 4;
else if(strcmp('B',a[i]) == 0)
total += 3;
else if(strcmp('C',a[i]) == 0)
total += 2;
else if(strcmp('D',a[i]) == 0)
total += 1;
}
printf("%d",total);
return 0;
}