Recent content by SGJ

  1. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { List<int> number = new List<int>(1000); // int list for 1000 numbers int[] check = new int[1000]...
  2. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    yes, why do I get a range error at Console.WriteLine(" " + number[numbers])
  3. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    sorry I am new to this, I posted the code in the comment above.
  4. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1{ class Program { static void Main(string[] args){ List<int> number = new List<int>(1000); // int list for 1000 numbersfor (int i = 0; i < 1000; i++) // for loop that...
  5. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1{ class Program{ static void Main(string[] args){ List<int> number = new List<int>(1000); // int list for 1000 numbersfor (int i = 0; i < 1000; i++) // for loop that...
  6. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    Thank you for that! Do you have any solution as to why I am getting large repetitions of numbers starting at around 970?
  7. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    I tried that and it printed 1-1000 several hundred times. I then tried just printing "number" but it printed "systems collection generic" another thousand or so times.
  8. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    So here is my problem (this is my first time using lists and this site so bear with me) whenever I try to run this it prints 970 and will repeat that number hundreds of times. I want it to print 1, 3, 5, 7, 11, 13, 17... ect. Please help urgent C#.
  9. S

    How to Identify Prime Numbers Using Eratosthenes in C#?

    Mod note: added code tags using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { List<int> number = new List<int>(1000); // int list for 1000 numbers...
  10. S

    Diagonal Winning Strategies in Connect 4: Help Needed!

    Homework Statement When I try and play it, it says that the Index out of range system was unhandled. I am pretty sure it is the j loop. Please help. In the game Connect 4, you can win diagonally, the grid is 6 squares down and 7 across. (5 positions down, 6 positions across including 0.)...
Back
Top