Recent content by SGJ
-
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]...- SGJ
- Post #19
- Forum: Programming and Computer Science
-
S
How to Identify Prime Numbers Using Eratosthenes in C#?
yes, why do I get a range error at Console.WriteLine(" " + number[numbers])- SGJ
- Post #18
- Forum: Programming and Computer Science
-
S
How to Identify Prime Numbers Using Eratosthenes in C#?
sorry I am new to this, I posted the code in the comment above.- SGJ
- Post #16
- Forum: Programming and Computer Science
-
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...- SGJ
- Post #15
- Forum: Programming and Computer Science
-
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...- SGJ
- Post #12
- Forum: Programming and Computer Science
-
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?- SGJ
- Post #7
- Forum: Programming and Computer Science
-
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.- SGJ
- Post #4
- Forum: Programming and Computer Science
-
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#.- SGJ
- Post #2
- Forum: Programming and Computer Science
-
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...- SGJ
- Thread
- Code Numbers Prime Prime numbers
- Replies: 21
- Forum: Programming and Computer Science
-
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.)...- SGJ
- Thread
- Computer Computer science Programming
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help