Untitled
unknown
plain_text
2 years ago
446 B
10
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;
}
Editor is loading...