Need small code please
Write a C# console program that determines prime numbers. You will ask the user for the number of prime numbers they wish to find and then output those prime numbers to the screen.
The algorithm for determining the prime number is as follows:
for (iCount = 2; iCount <= Math.Sqrt(number); iCount++)
{
if(number % iCount == 0)
{
//the number is not prime:
//appropriate code goes here.
}
}
if(number is prime)
{
//print the prime number
//increase our counter
}
} //end
Output 10 prime numbers per line
Thank you x 10
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

bilnaadRank #2,169 · 655 reputationPosted Oct 27, 2004, 12:17 PM EDT
kovanRank #1,453 · 1.1K reputationPosted Oct 29, 2004, 7:29 AM EDT