Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a,b;
- int posledenBroj;
- int prvBroj;
- int proizvod = 1;
- int temp,temp1;
- scanf("%d%d",&a,&b);
- int i;
- int brojac = 0;
- for(i=a;i<b;i++)
- {
- temp = i;
- posledenBroj = temp%10;
- temp/=10;
- while(temp>9)
- {
- temp1 = temp%10;
- proizvod*=temp1;
- prvBroj = temp;
- temp/=10;
- }
- if((prvBroj*10 + posledenBroj) % prozvod == 0)
- {
- int temp3 = (prvBroj*10 + posledenBroj) / prozvod;
- printf("%d -> (%d == %d * %d",i,prozvod,temp3);
- broj++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement