title: How do i print square root of user input in bash?
body: <p>I have recently discovered 'bc' in bash, and i have been trying to use it to print out the square root of a user input. The program i wrote below runs successfully, but it only prints out '0' and not the square root of the user input.</p>
  
  <p>Here is the code i wrote:</p>
  
  <pre><code> #!/data/data/com.termux/files/usr/bin/bash
  
   echo "input value below"
   read VAR
   echo "square root of $VAR is..."
  
   echo $((a))                                  
   a=$(bc &lt;&lt;&lt; "scale=0; sqrt(($VAR))")
  </code></pre>
  
  <p>What is the problem with my code? What am i missing?</p>