Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace primeChecker
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- for (int current = 2; current <= number; current++)
- {
- string isSimple = "true";
- for (int divisor = 2; divisor < current; divisor++)
- {
- if (current % divisor == 0)
- {
- isSimple = "false";
- break;
- }
- }
- Console.WriteLine($"{current} -> {isSimple}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement