daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @IBAction func calculerButtonAction(_ sender: Any) {
  2.    
  3.         let coteOneValue :Float = (self.coteOneTF.text! as NSString).floatValue
  4.         let coteTwoValue :Float = (self.coteTwoTF.text! as NSString).floatValue
  5.    
  6.         let valueOne :Float = 1/coteOneValue
  7.         let valuetwo :Float = 1/coteTwoValue
  8.        
  9.         let miseValue :Float  = valueOne + valuetwo
  10.         print(miseValue)
  11.         let miseConstantValue : Float = 1.0
  12.         if miseValue <= miseConstantValue {
  13.            
  14.             let alert = UIAlertController(title: "Information", message: "C' est un surebet", preferredStyle: UIAlertControllerStyle.alert)
  15.             alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
  16.             self.present(alert, animated: true, completion: nil)
  17.         }
  18.         else {
  19.            
  20.             let alert = UIAlertController(title: "Information", message: "C' est pas un surebet", preferredStyle: UIAlertControllerStyle.alert)
  21.             alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
  22.             self.present(alert, animated: true, completion: nil)
  23.         }
  24.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top