Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
25
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int i,p,n,d; Console.WriteLine("PRIME NUMBER CHECKING"); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~"); { Console.WriteLine("Enter the value for checking:"); n =Convert.ToInt16(Console.ReadLine()); p = 0; for (i=2;i<=n/2;i++) { if (n % i == 0) { p++; break; } } if (p == 0) { Console.WriteLine("The given number is prime number"); } else { Console.WriteLine("The given number is not prime number"); } Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
default branch name
Get Distinct value using Group By , Having , Count in DataTable C#
1 -5 6 x1=3 x2=2
Pruebas
enigma
array integration
circular linked list
NumsToVars
Maximum profit
dynamic in C#
Please log in to post a comment.