title: Stuck on Swift coding, stuck on something that must be simple
body: <p>I'm trying to create what I thought would be an incredibly simple little app. I basically need it to do some basic spreadsheet math.</p>
  
  <p>In terms of excel I need <code>=(A1*A2)/1000*(A3)</code>.</p>
  
  <p>I then need <code>=(A4-A5)</code>.</p>
  
  <p>Then the total would equal those two numbers multiplied.</p>
  
  <p>I've attached a screenshot and I hope this makes sense.</p>
  
  <p><img src="https://i.stack.imgur.com/Cw8bx.png" alt="screen shot"></p>
  
  <p>Now I know this code is impossible but in my head I need this to work:</p>
  
  <pre><code>@IBAction func buttoncalc(_ sender: Any) {
      total.isHidden = false
      let firstValue = Double(text1.text!)
      let secondValue = Double(text2.text!)
      let thirdValue = Double(text3.text!)
      let forthValue = Double(text4.text!)
  
      if firstValue != nil &amp;&amp; secondValue != nil {
          let outputvalue = Double(firstValue! * secondValue!)\1000 * Double(thirdValue - forthValue)
  
          total.text = "The answer is \(outputvalue)"
      }
  }
  </code></pre>