Created
November 1, 2015 12:11
-
-
Save nbarnold01/227f37ce4554c8d5183e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// Flipping Bits | |
// | |
// Created by Nathan Arnold on 11/1/15. | |
// Copyright © 2015 Nathan Arnold. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
// insert code here... | |
int length = 0; | |
scanf("%d",&length); | |
for (int i =0; i< length; i++){ | |
unsigned num = 0; | |
scanf("%u",&num); | |
//bitwise NOT | |
printf("%u\n",~num); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment