title: Square root finding using prolog
body: <p>I worked on following coding to find square root. But it didn't work. I couldn't find the error. Up to finding the value of Y it's working. The square root part does not.</p>
  
  <pre><code>print('A = '), read(A),
  print('B = '), read(B),
  print('C = '), read(C),
  nl,
  nl,
  X is 2*A,
  Y is (B^2 - 4*A*C),
  Z is sqrt(Y),
  
  R1 is (-B+Z)/X,
  R2 is (-B-Z)/X,
  
  print('R1 = '), print(R1), nl,
  print('R2 = '), print(R2), nl.
  </code></pre>