fork download
  1. uses math;
  2.  
  3. var cislo : string;
  4. i, bin : integer;
  5.  
  6. begin
  7. readln(cislo);
  8. bin := 0;
  9.  
  10. for i := 0 to 5 do
  11. begin
  12. bin := bin + power(2, i) * integer(cislo[i]);
  13. end;
  14.  
  15. writeln(bin);
  16. 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(12,14) Error: Incompatible types: got "Extended" expected "SmallInt"
prog.pas(16,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