TOPIC

Tentei, no gcc ,tudo bem. Porém aqui deu erro!

RIBAMILTOMBEZERRADELIMA asked 2 years ago

include

int main(){

int V[500];
int i,j,counter=0;

scanf("%d",&j);

for(i=0;i<j;i++){

    scanf("%d",&V[i]);

        if ((i>=1) && (V[i] != V[i-1])) counter ++;
}

printf("%d\n", counter); return 0;

}

Remember not post solutions. Your post may be reviewed by our moderators.

  • PedroL. replied 8 months ago

    Some mais um ao resultado