@Tom_Buck wrote:
EDIT: I guess this is a visual studio problem. I commented out every part of the code and it still happened... am I crazy?
So I've found a new way to embarrass myself with a basic question, but I don't know what's going on here. Also, if someone could tell me how to format the text in this forum, I would appreciate it.
'''
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Euler.150
{
class Prime1
{
public Prime1()
{
Console.WriteLine("What is your uppper limit in searching for prime numbers?");
int limit = Console.Read();List<bool> isPrime = new List<bool>(); for (int i = 0; i <= limit; i++) { isPrime.Add(true); } for (int i = 0; i <= limit; i++) { Console.WriteLine(isPrime[i]); } Console.Read(); } }
}
'''My goal is to eventually make a program that finds all primes within a given integer value. At this point, I just want get a bounds for a list and then print the true false (all true) values within that list. I see it happening as intended, but then it instantly shuts down with this in the debug window. wutmydoinwrong?
'''
'Euler.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.'Euler.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'c:\users\tracer\source\repos\Euler\Euler\bin\Debug\Euler.exe'. Symbols loaded.
The program '[11292] Euler.exe' has exited with code 0 (0x0).
'''
Posts: 4
Participants: 3