Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace prosto_4islo
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int counter = 0;
- for (int i = 1; i <= n; i++)
- {
- if (n % i == 0)
- {
- counter++;
- }
- }
- if (counter == 2)
- {
- // prosto
- Console.WriteLine("Prime");
- }
- if (counter > 2)
- {
- Console.WriteLine("NonPrime");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement