Answers for "prime number swift"

0

Prime number or not program in swift basic programs

var value=0var n = 10var i = 2for i in 2 ... n-1{    if(n%i==0)    {        value = 1;        break;    }}if(value==1){    print("(n)" + " not prime")}else{    print("(n)" + "  prime")}
Posted by: Guest on June-27-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language