Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int min;
- int max;
- scanf("%d %d", &min, &max);
- for (int i = min; i <= max; i++)
- {
- int egyes;
- int tizes;
- int szazas;
- egyes = i % 10;
- tizes = ((i % 100) - egyes) / 10;
- szazas = (((i % 1000) - tizes) - egyes) / 100;
- if ((szazas - tizes) == (tizes - egyes))
- {
- printf("%d\n", i);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement