only one case is satisfied
What is the error
#include <stdio.h> #include<string.h> int main() { int i,j=1; char str[10]; scanf("%s",str); for(i=0;i<strlen(str);i++) { if(str[i]==str[i+1]) { j++;} printf("%c",str[i]); if(str[i]!=str[i+1]) { printf("%d",j); j=1; }} return 0;}

add this line inside if statement( line no 11)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
