Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime no for specified max no by user(Using While Loop)
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 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; double count; Console.WriteLine("Enter Count:"); count = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("The count is {0}",count); for(i=1; i<=count; i++) { if(i%2==0||i%3==0||i%5==0) Console.WriteLine("{0} is not a prime no",i); else Console.WriteLine("{0} is prime no",i); Console.ReadLine(); } } } }
run
|
edit
|
history
|
help
0
regex: rozważania nad powielaniem grup za pomocą kwantyfikatora
dfg reter ter ertert
rekenmachine in c#
Main4-1
Hei
nums y lists
172
Rextester.Program.Main
linq sort
quick sort