Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @IBOutlet weak var P1: UITextField!
- @IBOutlet weak var P2: UITextField!
- @IBOutlet weak var F1: UILabel!
- @IBOutlet weak var F2: UILabel!
- @IBOutlet weak var res1: UILabel!
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
- @IBAction func total(_ sender: Any) {
- let n1 = Double(N1.text!)
- let p1 = Double(P1.text!)
- let f1 = Double(n1! + p1!)
- F1.text = "(f1)"
- int x = [[F1.text] x];
- let n2 = Double(N2.text!)
- let p2 = Double(P2.text!)
- let f2 = Double(n2! + p2!)
- F2.text = "(f2)"
- res1.text = "(res1)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement