Skip to content

Instantly share code, notes, and snippets.

@lzzy12
Created January 2, 2018 12:09
Show Gist options
  • Save lzzy12/f06be9cf0ce2b5d7758259e76be42ee4 to your computer and use it in GitHub Desktop.
Save lzzy12/f06be9cf0ce2b5d7758259e76be42ee4 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
using namespace std;
int main(){
string input;
cin >> input;
for (string::size_type i = 0; i < input.length(); i++)
{
if (input[i] == '0')
input[i] = '1';
else input[i] = '0';
}
cout << endl << input;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment