Question : swift generate random number
Answered by : mobile-star
let randomInt = Int.random(in: 0..<6)
let randomDouble = Double.random(in: 2.71828...3.14159)
let randomBool = Bool.random()
Source : | Last Update : Mon, 09 Mar 20
Question : random number swift
Answered by : sej
let randInt = Int.random(in: 0...100)
// The range can be a closed (a...b) or half open (a..<b) range.
Source : | Last Update : Tue, 23 Jun 20