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 _2
- {
- class Program
- {
- static void Main(string[] args)
- {
- double b = double.Parse(Console.ReadLine());
- string v = "";
- for (int i = 1; i <= b; i++)
- {
- if (b % i == 0 && b == i)
- {
- v = "prime number";
- break;
- }
- else
- {
- v = "Not prime number";
- }
- Console.WriteLine(v);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement