Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
prime
//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 n,i,m=0,flag=0; Console.Write("enter the number"); n=int.Parse(Console.ReadLine()); m=n/2; for(i=2;i<=m;i++) { if(n%i==0) { Console.Write("number is not prime"); flag=1; break; } } if(flag==0) Console.Write("number is prime"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Numerical string to fancy graphical output
Math 9.3
calc
With Arguments
VBA
Bubble Sort
I know it's a bit combersome, but it's my first attempt.
DateTime.Now.Date
Testing 001
Only unique chars into string?
Please log in to post a comment.