3 added 106 characters in body; deleted 17 characters in body
source | link

C (gcc), 9090 88 bytes

ll=10;u(u,c,k,y){y=10;forfor(k=0;u<=c;y=0;c<=k;)u++%y+uc++%l+c/y%y+ul%l+c/100%y100%l-uc/1000%y1000%l-uc/10000%y10000%l-uc/100000%y100000%l?:++k;u=k;++y;c=y;}

Port of my Java answer. Try it online herehere. Thanks to ceilingcat for golfing two bytes.

Ungolfed:

l(ul=10; // constant, we will be using the number 10 rather a lot
u(c, k, // function returning an integer and taking two integer arguments: lower and upper bound
  k,y) { // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range ...
  y) { // ... and a constant ...
    y = 10; // ... since we will use the number 10 a lot
    for(ky = 0; uc <= c;k; ) // set count to 0 and loop through the range
        u++c++ %y%l + uc/yl %y%l + uc/100 %y%l // if the digit sum of the second half of the ticket number ...
        - uc/1000 %y%l - uc/10000 %y%l - uc/100000 %y%l // ... is the same as the digit sum of the first half ...
        ?: ++k;++y; // ... it's a lucky ticket: increment the count
    uc = k;y; // return the count
}

C (gcc), 90 bytes

l(u,c,k,y){y=10;for(k=0;u<=c;)u++%y+u/y%y+u/100%y-u/1000%y-u/10000%y-u/100000%y?:++k;u=k;}

Port of my Java answer. Try it online here.

Ungolfed:

l(u, c, // function returning an integer and taking two integer arguments: lower and upper bound
  k, // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range ...
  y) { // ... and a constant ...
    y = 10; // ... since we will use the number 10 a lot
    for(k = 0; u <= c; ) // set count to 0 and loop through the range
        u++ %y + u/y %y + u/100 %y // if the digit sum of the second half of the ticket number ...
        - u/1000 %y - u/10000 %y - u/100000 %y // ... is the same as the digit sum of the first half ...
        ?: ++k; // ... it's a lucky ticket: increment the count
    u = k; // return the count
}

C (gcc), 90 88 bytes

l=10;u(c,k,y){for(y=0;c<=k;)c++%l+c/l%l+c/100%l-c/1000%l-c/10000%l-c/100000%l?:++y;c=y;}

Port of my Java answer. Try it online here. Thanks to ceilingcat for golfing two bytes.

Ungolfed:

l=10; // constant, we will be using the number 10 rather a lot
u(c, k, // function returning an integer and taking two integer arguments: lower and upper bound
  y) { // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range
    for(y = 0; c <= k; ) // set count to 0 and loop through the range
        c++ %l + c/l %l + c/100 %l // if the digit sum of the second half of the ticket number ...
        - c/1000 %l - c/10000 %l - c/100000 %l // ... is the same as the digit sum of the first half ...
        ?: ++y; // ... it's a lucky ticket: increment the count
    c = y; // return the count
}
2 added 110 characters in body; deleted 7 characters in body
source | link

C (gcc), 90 bytes

l(u,c,k,y){fory=10;for(k=0;u<=c;)u++%10+uu++%y+u/10%10+uy%y+u/100%10100%y-u/1000%101000%y-u/10000%1010000%y-u/100000%10100000%y?:++k;u=k;}

Port of my Java answer. Try it online herehere.

Ungolfed:

l(u, c, // function returning an integer and taking two integer arguments: lower and upper bound
  k) { , // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range ...
  y) { // ... and a constant ...
    y = 10; // ... since we will use the number 10 a lot
    for(k = 0; u <= c; ) // set count to 0 and loop through the range
        u++ %10%y + u/10y %10%y + u/100 %10%y // if the digit sum of the second half of the ticket number ...
        - u/1000 %10%y - u/10000 %10%y - u/100000 %10%y // ... is the same as the digit sum of the first half ...
        ?: ++k; // ... it's a lucky ticket: increment the count
    u = k; // return the count
}

C (gcc), 90 bytes

l(u,c,k){for(k=0;u<=c;)u++%10+u/10%10+u/100%10-u/1000%10-u/10000%10-u/100000%10?:++k;u=k;}

Port of my Java answer. Try it online here.

Ungolfed:

l(u, c, // function returning an integer and taking two integer arguments: lower and upper bound
  k) {  // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range
    for(k = 0; u <= c; ) // set count to 0 and loop through the range
        u++ %10 + u/10 %10 + u/100 %10 // if the digit sum of the second half of the ticket number ...
        - u/1000 %10 - u/10000 %10 - u/100000 %10 // ... is the same as the digit sum of the first half ...
        ?: ++k; // ... it's a lucky ticket: increment the count
    u = k; // return the count
}

C (gcc), 90 bytes

l(u,c,k,y){y=10;for(k=0;u<=c;)u++%y+u/y%y+u/100%y-u/1000%y-u/10000%y-u/100000%y?:++k;u=k;}

Port of my Java answer. Try it online here.

Ungolfed:

l(u, c, // function returning an integer and taking two integer arguments: lower and upper bound
  k, // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range ...
  y) { // ... and a constant ...
    y = 10; // ... since we will use the number 10 a lot
    for(k = 0; u <= c; ) // set count to 0 and loop through the range
        u++ %y + u/y %y + u/100 %y // if the digit sum of the second half of the ticket number ...
        - u/1000 %y - u/10000 %y - u/100000 %y // ... is the same as the digit sum of the first half ...
        ?: ++k; // ... it's a lucky ticket: increment the count
    u = k; // return the count
}
1
source | link

C (gcc), 90 bytes

l(u,c,k){for(k=0;u<=c;)u++%10+u/10%10+u/100%10-u/1000%10-u/10000%10-u/100000%10?:++k;u=k;}

Port of my Java answer. Try it online here.

Ungolfed:

l(u, c, // function returning an integer and taking two integer arguments: lower and upper bound
  k) {  // abusing the argument list to declare a variable of type integer: the number of lucky tickets found in the range
    for(k = 0; u <= c; ) // set count to 0 and loop through the range
        u++ %10 + u/10 %10 + u/100 %10 // if the digit sum of the second half of the ticket number ...
        - u/1000 %10 - u/10000 %10 - u/100000 %10 // ... is the same as the digit sum of the first half ...
        ?: ++k; // ... it's a lucky ticket: increment the count
    u = k; // return the count
}