#include<stdio.h>
#include<string.h>
int main()
{
int emoogle[1002];
int m,N,case_number=0;
while(scanf("%d",&N)==1)
{
if(N==0)
{
break;
}
int counter=0,counter1=0;
for(m=1;m<=N;m++)
{
scanf("%d",&emoogle[m]);
if(emoogle[m]==0)
{
counter++;
}
else
{
counter1++;
}
}
printf("Case %d: %d\n",++case_number,counter1-counter);
memset(emoogle,0,sizeof(emoogle));
}
return 0;
}
#include<string.h>
int main()
{
int emoogle[1002];
int m,N,case_number=0;
while(scanf("%d",&N)==1)
{
if(N==0)
{
break;
}
int counter=0,counter1=0;
for(m=1;m<=N;m++)
{
scanf("%d",&emoogle[m]);
if(emoogle[m]==0)
{
counter++;
}
else
{
counter1++;
}
}
printf("Case %d: %d\n",++case_number,counter1-counter);
memset(emoogle,0,sizeof(emoogle));
}
return 0;
}
0 comments: (+add yours?)
Post a Comment