Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Math Prime Numbers
//Find the 24th, 101st and 251st prime number. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int primeNumber = 1; int primeCounter = 0; while (true) { if ( primeNumber % 2 != 0 && primeNumber % 3 != 0 && primeNumber % 5 != 0 && primeNumber % 7 != 0) { Console.WriteLine(primeNumber); primeCounter++; } primeNumber++; if (primeNumber == 10000) break; } } } }
run
|
edit
|
history
|
help
0
Dokkan 2.0
Random Integers
WallPascal
PYRAMIDPATTERN
test1
static
tokenExchange
ERFDAX
asdfsdgghjghkhj
count-letter-frequencies