using System;
namespace Demo {
class MyApplication {
public static void Main() {
int n = 5, a = 0;
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
a++;
}
}
if (a == 2) {
Console.WriteLine("{0} is a Prime Number", n);
} else {
Console.WriteLine("Not a Prime Number");
}
Console.ReadLine();
}
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265907.html