X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2Fpc.cpp;fp=dart%2Fpc.cpp;h=6f43debf7f3a990a7657337d977a37e1e4dc81b9;hb=008ba91d9e2cfdcffa263bbfea51298026899d16;hp=0000000000000000000000000000000000000000;hpb=c4c34a4239839e73fea31251ccd6dd04f9a80827;p=svn42.git diff --git a/dart/pc.cpp b/dart/pc.cpp new file mode 100644 index 0000000..6f43deb --- /dev/null +++ b/dart/pc.cpp @@ -0,0 +1,23 @@ +#include + +int main() +{ + unsigned char c =0; + unsigned char sym =0; + int counter = 1000; + while( counter--) + { + std::cin >> c; + for(int i = 0; i<8; i++) + { + sym = c & (1<<7); + if( sym) + { + std::cout << "1,"; + } else { + std::cout << "0,"; + } + c<<=1; + } + } +}