查找第一个N回文数的C程序不会打印任何内容

I am trying to make a program to print the N first palindrome numbers(not until N but the first N numbers). The problem is that I run it, I give a number and it just exists without doing nothing or printing something.

Something that I tried, is to make a similar program to check only one number at a time and found that in the if condition where I check the number, if I write N == reverse I get

0是好朋友号码

but If I save the original number in a variable like the N1 and instead write N1 == reverse I get the actual number

N(无论数字是多少)是朋友号码

不仅是0。我尝试在此程序中执行此操作,但仍然无法正常工作。

#include <stdio.h>

int main()
{
    int N, i, j, reverse, curNum, rem, N1;

    printf("Give N numbers: ");
    scanf("%d", &N);
    N1 = N;

    for (i = 0; i <= N; i++)
    {
        for (j = 0; j <= i; j++)
        {
            rem = curNum % 10;
            curNum = curNumr / 10;
            reverse = reverse * 10 + rem;
        }

        if (N1 == reverse)
        {
            printf("%d", N1);
            i++;
        }
    }
    return 0;
}