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")}
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")}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us