Skip to content

Instantly share code, notes, and snippets.

@jkotra
Created July 27, 2019 18:00
Show Gist options
  • Save jkotra/c27a39cf5862f54565353c9e43d7535c to your computer and use it in GitHub Desktop.
Save jkotra/c27a39cf5862f54565353c9e43d7535c to your computer and use it in GitHub Desktop.
primes
fn main(){
let mut flag = true;
for i in 2..100{
for j in 2..i{
if i%j==0{
flag=false;
break;
}else{
if flag == false{
flag=true;
}
}
}
if flag{
println!("{}",i )
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment