-
-
Save salihyalcin/f7516a8c11bc1489a71c67a6e47c6948 to your computer and use it in GitHub Desktop.
YGS - LYS için net hesabı
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
func calculateNet(correct:Int = 0 , wrong:Int = 0 , count:Int = 0) -> (Float) { | |
var result : Float = 0 | |
if (correct <= count && correct >= 0) && (wrong <= count && wrong >= 0) { | |
if (correct + wrong <= count){ | |
result = Float(correct) - Float(wrong)/4 | |
print("Net : \(result)") | |
} | |
} | |
return result | |
} | |
var test : Float = calculateNet(correct: 0, wrong: 10, count: 20) | |
deneme | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment