Question: In Swift Language, Write an extension for the Int data type that includes a computed property called isPrime. This property should be Bool data type
In Swift Language,
Write an extension for the Int data type that includes a computed property called isPrime. This property should be Bool data type and should be false if number stored in Int is not a prime number and should be true if the number stored in the Int is a prime number.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
