title: Why do I get an error when adding an integer to a floating point?
body: <p>I started learning Rust. I tried this program:</p>
  
  <pre><code>fn main() {
       let a = 5;
       let b = 5.5;
       let k = a + b;
       println!("{}", k);
  }
  </code></pre>
  
  <p>and it is showing this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0277]: cannot add a float to an integer
   --&gt; src/main.rs:4:16
    |
  4 |      let k = a + b;
    |                ^ no implementation for `{integer} + {float}`
    |
    = help: the trait `std::ops::Add&lt;{float}&gt;` is not implemented for `{integer}`
  </code></pre>
  
  <p>Is the code wrong?</p>