Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void F(int n) {
- if (n) {
- printf("%d ",n- (n &(n - 1)));
- F((n &(n - 1)));
- }
- }
- int main() {
- int n;
- printf("n= "); scanf("%d", &n);
- F(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement