using System;
public class Program
{
// Just an exercise, else would use .isprime(x)
public static void Main()
for (int x = 1; x <= 100; x++)
if (Inner_Loop(x) == true) {Console.WriteLine(x);}
}
public static bool Inner_Loop(int x)
// Prime can be divided by 1 or by self
// Use modulus to check for 2 instances of clean division of x
int p = 0;
for(int y = 1; y <= x; y++)
if (x % y == 0) {p++;}
if (x == 1) {return true;}
else if (p == 2) {return true;}
else {return false;}