#include <stdio.h>
#define MAX 100
int maior_sequencia_zeros(char seq[]){
int cont_zero = 0;
int max_seq = 0;
for(int i = 0; seq[i] != '\0'; i++){
if(seq[i] == '0'){
cont_zero += 1;
} else {
cont_zero = 0;
}
if(cont_zero > max_seq){
max_seq = cont_zero;
}
} return max_seq;
}
int main() {
char seq[MAX];
scanf("%s", seq);
printf("%d", maior_sequencia_zeros(seq));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: