Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i;
- char ibr[40];
- gets(ibr);
- int l=strlen(ibr);
- for(i=l-1; i>=0 ; i--)
- {
- if(ibr[i]=='1')
- ibr[i]='0';
- else if(ibr[i]=='0')
- ibr[i]='1';
- }
- printf("%s",ibr);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement