Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- //int x;
- //x = 2;
- //do
- //{
- // Console.WriteLine(x);
- // x = x * 2;
- // System.Threading.Thread.Sleep(500);
- //} while (x < 50);
- //Console.ReadKey();
- //}
- for (int x = 2; x < 100; x++)
- {
- int isPrime = 0;
- for (int y = 1; y < x; y++)
- {
- if (x % y == 0)
- isPrime++;
- if (isPrime == 2) break;
- }
- if (isPrime != 2)
- Console.WriteLine(x);
- isPrime = 0;
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement