fork download
  1. [code][{Solve the cryptogram LOCK
  2. CANAL
  3. CACHE
  4. -----
  5. HIDDEN
  6.  
  7. found on Programmers Heaven that somebody wanted some help with
  8. on this date 2012-Aug-25
  9.  
  10. revised by Carl W. Skipworth Rev Date 2012-Aug-28 }
  11.  
  12. program Hidden;
  13.  
  14. const
  15. nz : integer = ord( '0' ); { number zero( in character form ) }
  16. ten = 10; { worth ten }
  17. oh = 100; { worth one hundred }
  18. ot = 1000; { worth one thousand }
  19. tt = 10000; { worth ten thousand }
  20. ht = 100000; { worth hundred thousand }
  21.  
  22. type
  23. str10 = string[10];
  24.  
  25. var
  26. l, o, c, k, a, n, h, e, i, d : integer;
  27. s, outstr : str10;
  28. fout : text;
  29. attempts : longint;
  30. successes : integer;
  31.  
  32. procedure TryOne;
  33.  
  34. begin
  35. Inc( attempts );
  36. l := ord( outstr[ 1] ) - nz;
  37. o := ord( outstr[ 2] ) - nz;
  38. c := ord( outstr[ 3] ) - nz;
  39. k := ord( outstr[ 4] ) - nz;
  40. a := ord( outstr[ 5] ) - nz;
  41. n := ord( outstr[ 6] ) - nz;
  42. h := ord( outstr[ 7] ) - nz;
  43. e := ord( outstr[ 8] ) - nz;
  44. i := ord( outstr[ 9] ) - nz;
  45. d := ord( outstr[10] ) - nz;
  46. if l * ot + o * oh + c * ten + k + { 1st word }
  47. c * tt + a * ot + n * oh + a * ten + l + { 2nd word }
  48. c * tt + a * ot + c * oh + h * ten + e = { 3rd word }
  49. h * ht + i * tt + d * ot + d * oh + e * ten + n then begin
  50. writeln( fout, ' l = ',l );
  51. writeln( fout, ' o = ',o );
  52. writeln( fout, ' c = ',c );
  53. writeln( fout, ' k = ',k );
  54. writeln( fout, ' a = ',a );
  55. writeln( fout, ' n = ',n );
  56. writeln( fout, ' h = ',h );
  57. writeln( fout, ' e = ',e );
  58. writeln( fout, ' i = ',i );
  59. writeln( fout, ' d = ',d );
  60. writeln( fout );
  61. writeln( fout,' ',l,o,c,k );
  62. writeln( fout,' ',c,a,n,a,l );
  63. writeln( fout,' ',c,a,c,h,e );
  64. writeln( fout,' --------' );
  65. writeln( fout,' ',h,i,d,d,e,n );
  66. writeln( fout);
  67. writeln;
  68. writeln( ' ',l,o,c,k );
  69. writeln( ' ',c,a,n,a,l );
  70. writeln( ' ',c,a,c,h,e );
  71. writeln( ' --------' );
  72. writeln( ' ', h,i,d,d,e,n );
  73. Inc( successes )
  74. end
  75. end;
  76.  
  77. procedure Permute_it ( s : str10 );
  78.  
  79. var
  80. ss : str10;
  81. i, len : integer;
  82.  
  83. begin
  84. len := length( s );
  85. if len = 0 then
  86. TryOne
  87. else
  88.  
  89. for i := 1 to len do begin
  90. outstr := outstr + s[i];
  91. ss := s;
  92. delete( ss, i, 1 );
  93. Permute_it( ss );
  94. Delete( outstr, length( outstr ), 1 )
  95. end
  96.  
  97. end;
  98.  
  99. begin
  100. assign( fout, 'B:HIDDEN.TXT');
  101. rewrite( fout );
  102. attempts := 0;
  103. successes := 0;
  104. outstr := '';
  105. s := '0123456789';
  106. Permute_it( s );
  107. writeln( fout, ' attempts = ', attempts, ' successes = ', successes );
  108. writeln( ' attempts = ', attempts, ' successes = ', successes );
  109. close( fout )
  110. end./code]
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


/home/2rUicT/prog.vb (1,8) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (1,9) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (1,9) : Error VBNC30034: An escaped identifier must end with ']'.
/home/2rUicT/prog.vb (2,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (3,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (4,2) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (5,7) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (7,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (8,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (10,8) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (12,8) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (12,15) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (14,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (15,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (16,4) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (16,9) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (17,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (17,9) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (18,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (18,10) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (19,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (19,11) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (20,3) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (20,12) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (22,5) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (23,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (23,16) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (23,16) : Error VBNC30034: An escaped identifier must end with ']'.
/home/2rUicT/prog.vb (23,18) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (25,4) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (26,2) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (26,39) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (27,2) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (27,18) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (28,5) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (28,12) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (29,9) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (29,19) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (30,10) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (30,20) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (32,10) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (32,17) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (34,6) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (35,4) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (35,16) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (36,2) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (36,18) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (36,18) : Error VBNC30034: An escaped identifier must end with ']'.
/home/2rUicT/prog.vb (36,20) : Error VBNC30037: Symbol is not valid.
/home/2rUicT/prog.vb (37,2) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (37,18) : Error VBNC30203: Not valid as identifier.
/home/2rUicT/prog.vb (37,18) : Error VBNC30041: Too many errors.
Exception of type 'vbnc.TooManyErrorsException' was thrown.
  at vbnc.Report.ShowMessage (Boolean SaveIt, vbnc.Message Message) [0x00080] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Report.vb:342 
  at vbnc.Report.ShowMessage (Messages Message, Span Location, System.String[] Parameters) [0x00000] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Report.vb:259 
  at vbnc.Report.ShowMessage (Messages Message, System.String[] Parameters) [0x00054] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Report.vb:269 
  at vbnc.Compiler.Compile () [0x005a3] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Compiler.vb:651 
  at vbnc.Compiler.Compile (System.String[] CommandLine) [0x00057] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Compiler.vb:279 
  at vbnc.Main.Main (System.String[] CmdArgs) [0x0000f] in /var/tmp/portage/dev-lang/mono-basic-2.4.2/work/mono-basic-2.4.2/vbnc/vbnc/source/General/Main.vb:55 
Failed compilation took 00:00:00.5920710
stdout
Standard output is empty