Anyone any good with Swift? Help


First post but I’m told this is the place to be for some beginners advice…

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 and I’m wondering if anyone can help?

In terms of excel I need =(A1A2)/1000(A3)

I then need =(A4-A5)

Then the total (A6) would equal those two numbers multiplied.

I’ve attached a screenshot and I hope this makes sense…

Any help or guidance much appreciated.

Now I know this isn’t code is impossible but in my head i need this to work…

@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 && secondValue != nil {

let outputvalue = Double(firstValue! * secondValue!)\1000 * Double(thirdValue - forthValue)

total.text = “The answer is (outputvalue)”

Thanks guys I’v figured it out.