Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Proekt
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- int n = int.Parse(Console.ReadLine ());
- bool prime = true;
- for(int i = 2;i<= Math.Sqrt(n);i++){
- if(n % i == 0){
- prime = false;
- }
- }
- Console.WriteLine (prime);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement