started dart
[svn42.git] / dart / pc.cpp
diff --git a/dart/pc.cpp b/dart/pc.cpp
new file mode 100644 (file)
index 0000000..6f43deb
--- /dev/null
@@ -0,0 +1,23 @@
+#include <iostream>
+
+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;
+    }
+  }
+}