Click here to Skip to main content
15,921,452 members
Home / Discussions / C#
   

C#

 
QuestionSQL Database Connection Pin
Darkness8421-Mar-07 18:06
Darkness8421-Mar-07 18:06 
AnswerRe: SQL Database Connection Pin
coolestCoder21-Mar-07 18:35
coolestCoder21-Mar-07 18:35 
GeneralRe: SQL Database Connection Pin
Darkness8421-Mar-07 18:40
Darkness8421-Mar-07 18:40 
GeneralRe: SQL Database Connection Pin
coolestCoder21-Mar-07 19:15
coolestCoder21-Mar-07 19:15 
GeneralRe: SQL Database Connection Pin
Darkness8421-Mar-07 19:20
Darkness8421-Mar-07 19:20 
QuestionRe: Calculate and Display Prime Numbers Pin
chitra4sat21-Mar-07 18:05
chitra4sat21-Mar-07 18:05 
AnswerRe: Calculate and Display Prime Numbers Pin
sherifffruitfly21-Mar-07 18:11
sherifffruitfly21-Mar-07 18:11 
AnswerRe: Calculate and Display Prime Numbers Pin
Leslie Sanford21-Mar-07 18:33
Leslie Sanford21-Mar-07 18:33 
chitra4sat wrote:
And i have to get the number from the user end using the Console.ReadLine().


Does this mean that your program is suppose to determine if a number entered by a user is prime?

Design your algorithm for determining whether a number is prime. Definition: An integer p is called a prime number if the only positive integers that divide p are 1 and p itself. Integers that are not prime are called composite. [^]

Aside from the number 2, we can eliminate all even numbers because all even numbers are evenly divisible by 2. For more details on optimizing a prime number algorithm, be sure to google. You'll find lots of stuff. This should get you started. If you have any questions, feel free to ask.
GeneralRe: Calculate and Display Prime Numbers Pin
chitra4sat21-Mar-07 19:27
chitra4sat21-Mar-07 19:27 
GeneralRe: Calculate and Display Prime Numbers Pin
Leslie Sanford21-Mar-07 19:37
Leslie Sanford21-Mar-07 19:37 
GeneralRe: Calculate and Display Prime Numbers Pin
chitra4sat21-Mar-07 19:48
chitra4sat21-Mar-07 19:48 
GeneralRe: Calculate and Display Prime Numbers Pin
Leslie Sanford21-Mar-07 20:00
Leslie Sanford21-Mar-07 20:00 
QuestionC# Automation Addin for Excel using ,NET - Build Error - Cannot Register Assembly (MSB3217) Pin
ralph_y21-Mar-07 17:58
ralph_y21-Mar-07 17:58 
QuestionHow to remove the rectangle from Propertygrid ? Pin
TaiZhong21-Mar-07 17:03
TaiZhong21-Mar-07 17:03 
AnswerRe: How to remove the rectangle from Propertygrid ? Pin
visualhint16-Apr-07 3:33
visualhint16-Apr-07 3:33 
Questionblock website function by enterring in texbox in a form.need help here Pin
krajah1021-Mar-07 15:26
krajah1021-Mar-07 15:26 
Questionthread question Pin
dino209421-Mar-07 14:51
dino209421-Mar-07 14:51 
AnswerRe: thread question Pin
Leslie Sanford21-Mar-07 17:02
Leslie Sanford21-Mar-07 17:02 
QuestionProgram structure need experienced programmers perspective please Pin
Mischievious21-Mar-07 14:36
Mischievious21-Mar-07 14:36 
AnswerRe: Program structure need experienced programmers perspective please Pin
Leslie Sanford21-Mar-07 17:05
Leslie Sanford21-Mar-07 17:05 
GeneralRe: Program structure need experienced programmers perspective please Pin
Mischievious21-Mar-07 18:14
Mischievious21-Mar-07 18:14 
QuestionQuestion about Windows Media Encoder Pin
Julianne_juju21-Mar-07 14:11
Julianne_juju21-Mar-07 14:11 
QuestionNeed help with XML config file Pin
Mark F.21-Mar-07 13:40
Mark F.21-Mar-07 13:40 
AnswerRe: Need help with XML config file Pin
coolestCoder21-Mar-07 18:31
coolestCoder21-Mar-07 18:31 
QuestionTrouble converting byte[] to bmp..... Pin
Are Jay21-Mar-07 12:17
Are Jay21-Mar-07 12:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.