title: Converting string value from text field to integer
body: <p>I'm really new to Swift and I am having problems with the conversion of a string (entered in a text field) to an integer.</p>
  
  <p>I'm trying to create a small calculation app (I was following a tutorial on YouTube but it's old).</p>
  
  <p>My app has 3 text fields, a label (that is meant to display the result), and a button to start the calculation.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
      @IBOutlet weak var valueA: UITextField!
      @IBOutlet weak var valueB: UITextField!
      @IBOutlet weak var valueC: UITextField!
      @IBOutlet weak var result: UILabel!
  
      @IBAction func calculateTotal(_ sender: Any) {
          var a:Int? = Int(valueA.text)
          var b:Int? = Int(valueB.text)
          var c:Int? = Int(valueC.text)
          var answer = a! * b! * c!
      }
  }
  </code></pre>