title: Error:(15, 1) Kotlin: A 'return' expression required in a function with a block body ('{...}')
body: <p>I get an error in this code:</p>
  
  <pre><code>fun num(num:Int):Int {
      if (num &gt; 0){ 
          print(num % 10)
          return num / 10
      }
  } //here an error
  </code></pre>
  
  <blockquote>
    <p>Error:(15, 1) Kotlin: A 'return' expression required in a function with a block body ('{…}')</p>
  </blockquote>
  
  <p>What does it mean and how do I fix it?</p>