Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- unsigned a, b, c, i , mult = 0;
- printf("a= "); scanf("%u", &a);
- printf("b= "); scanf("%u", &b);
- printf("c= "); scanf("%u", &c);
- if (c > 30) {
- printf("Date introduse gresit");
- return 0;
- }
- for (i = 1; (mult|( 1 << i * c)) <=(1 << b); i++) {
- mult |= 1 << i * c;
- }
- a = 1 << a;
- b = 1 << b;
- while (a <= b) {
- if ((a & mult) == mult)
- printf("%u", a);
- a++;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment