• + 0 comments

    include

    include

    include

    include

    int main(void){ char* arr = (char*)malloc(1000*sizeof(char)); int *finalDigit = (int )calloc(1000, sizeof(int)); if (finalDigit == NULL) { printf("Memory allocation failed\n"); return 1; } scanf("%s", arr); int digit = (int *)malloc(1000*sizeof(int)); int len = strlen(arr), digitCount=0; for(int i = 0;i