Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate a graphic with Pascal
    primarykey
    data
    text
    <p>I'm trying to create a Kakuro with Pascal, the program should get the Kakuro empty (something like <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Kakuro_black_box.svg/250px-Kakuro_black_box.svg.png" rel="nofollow">this</a>) and return it completed (something like <a href="http://upload.wikimedia.org/wikipedia/commons/7/72/Kakuro_black_box_solution.svg" rel="nofollow">this</a>). I already have loaded the data (from a file) and pass to one 2d array.</p> <p>The problem I've found is related with the diagonally divided squares, I don't know how I can print this division and a number in each of the sides with Pascal console.</p> <p>I've tried to use Pascal graphic libraries, but the alghoritm should run on several computers with diferent compilers and Pascal has not unified libraries, only crt and don't help with this (or I can't find it).</p> <p>Also I try something like ASCII, creatings grid with <code>--</code> and ’|` but when I print the values with two digits deform all the output, the code is this:</p> <pre><code>for c := 1 to maxc do begin for f := 1 to maxf do begin WriteLn('+---+'); WriteLn('|\',tablero[v,f,c],'|'); WriteLn('| \ |'); WriteLn('|', tablero[h,f,c], ' \|'); WriteLn('+---+'); end; WriteLn(); end; </code></pre> <p>And the problem in the output you can see this:</p> <pre><code>+---+ |\-1| | \ | |23 \| +---+ +---+ |\0| | \ | |0 \| +---+ </code></pre> <p>I thought of creating another 2d array inside my 2d array but if I do that I get something like:</p> <pre><code>+---+ | | |---| | | +---+ </code></pre> <p>Divided by half, and it need to be done diagonally, so doesn't work very well either.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload