fork download
  1. uses math;
  2.  
  3. var cislo : string;
  4. i, bin : integer;
  5.  
  6. begin
  7. readln(cislo);
  8.  
  9. for i := 0 to 5 do
  10. begin
  11. bin := bin + power(2, i) * cislo[i];
  12. end;
  13.  
  14. writeln(bin);
  15. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Free Pascal Compiler version 2.2.0 [2009/11/16] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling prog.pas
prog.pas(11,35) Error: Incompatible types: got "Char" expected "Extended"
prog.pas(15,4) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty