https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/reflection-is-every-thing-2fff0566/submissions/
#include <stdio.h>
int main()
{
char str[10001];
gets(str);
int c=0,i;
for(i=1;str[i] != '\0'; i++)
if(str[i] == str[i-1])
c++;
printf("%d",c);
}
No comments:
Post a Comment