daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 66 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.         let coteThreeValue:Float = (self.coteThreeTF.text! as NSString).floatValue
  6.        
  7.          let valueOne :Float = 1/coteOneValue
  8.          let valuetwo :Float = 1/coteTwoValue
  9.          let valueThree :Float = 1/coteThreeValue
  10.        
  11.         let miseValue :Float  = valueOne + valuetwo + valueThree
  12.         print(miseValue)
  13.         let miseConstantValue : Float = 1.0
  14.         if miseValue <= miseConstantValue {
  15.            
  16.             let alert = UIAlertController(title: "Information", message: "C' est un surebet", preferredStyle: UIAlertControllerStyle.alert)
  17.             alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
  18.             self.present(alert, animated: true, completion: nil)
  19.         }
  20.         else {
  21.            
  22.             let alert = UIAlertController(title: "Information", message: "C' est pas un surebet", preferredStyle: UIAlertControllerStyle.alert)
  23.             alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
  24.             self.present(alert, animated: true, completion: nil)
  25.         }
  26.     }
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