Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
446 B
1
Indexable
/*
    needs to be solved


*/


#include <stdio.h>
int main()
{
    int n,a,b;
    scanf("%d %d %d",&n,&a,&b);
    for (int i = 1; i <= n; i++)
    {
        int rem=0;
        int temp=i;
        while (temp)
        {
            rem=rem+temp%10;      
            temp/=10;
        }
        if (rem>=a && rem<= b)
            {
                printf("%d ",i);
            }
        
    }
    
    return 0;
}