Untitled
unknown
plain_text
2 years ago
447 B
10
Indexable
#include <stdio.h>
int main()
{
int n,a,b;
scanf("%d %d %d",&n,&a,&b);
for (int i = 1; i <= n; i++)
{
int temp=i;
while (temp)
{
int rem=temp%10;
int rem1=temp%100/10;
int k=(rem+rem1);
if (k>=a && k<= b)
{
printf("%d ",temp);
}
temp/=10;
}
}
return 0;
}Editor is loading...