THIS IS WHY .NET IS A BIG PIECE OF FUCKING SHIT.WHY DOESNT MY CODE WORKS???...

THIS IS WHY .NET IS A BIG PIECE OF FUCKING SHIT.WHY DOESNT MY CODE WORKS????I LOOKED IT OVER AND OVER AND IM SURE THERES NOTHING WRONG WITH IT YET .NET STILL MANAGES TO FUCK IT UP.


my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//uploads an array with numbers between 3-56
int[] Shit = new int[ 100 ];
Random r = new Random();
for (int i = 0; i < Shit.Length; i++)
{
Shit[ i ] = r.Next( 3 , 57 );
}
//writing out the elements of the array
for (int i = 0; i < Shit.Length; i++)
{
Console.Write( Shit[ i ] + "\t" );
}
//smalles number + index of smallest number
int Min = 0;
int MinIndex = 0;
for (int i = 0; i < Shit.Length; i++)
{
if (Min > Shit[ i ])
{
Shit[ i ] = Min;
MinIndex = i;
}
}
Console.WriteLine("min: " + Min);
Console.WriteLine("minindex: " + MinIndex);
}
}
}

>>Sup Forumsdpt/

POO

reformat and put this shit between code tags.

You know that .net is a framework right? You are not really using it in the code provided. It's your own stupidity.

the problem is that the code doesnt contains any bug neither the IDE tells me that theres any problem and it works the only problem is that it gives an impossible answer for the last two numbers.it shouldnt be possible.if theres some kind of miscounting problem with my cpu shouldnt it died already?

Shit[i] = min ; is the wrong line. Before bashing something practice more programming. You seem to be an undergraduate who is having trouble with your assignments...

>The code doesn't do what I think it should do
>Lets just blame the computer and the IDE

poo

no its not wrong.look at it again.and yes im an undergraduate

The condition is also wrong

Trust me. It is wrong.

mister "everything is wrong" here is the run of the program.my problem is that the last number shouldnt be 0.the conditional is good and working.maybe im an undergraduate but you know even less about programming than i.

how so?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//uploads an array with numbers between 3-56
int[] Shit = new int[ 100 ];
Random r = new Random();
for (int i = 0; i < Shit.Length; i++)
{
Shit[ i ] = r.Next( 3 , 57 );
}
//writing out the elements of the array
for (int i = 0; i < Shit.Length; i++)
{
Console.Write( Shit[ i ] + "\t" );
}
//smalles number + index of smallest number
int Min = 0;
int MinIndex = 0;
for (int i = 0; i < Shit.Length; i++)
{
if (Min > Shit[ i ])
{
Shit[ i ] = Min;
MinIndex = i;
}
}
Console.WriteLine("min: " + Min);
Console.WriteLine("minindex: " + MinIndex);
}
}
}

if it works for less eye cancer

What are you trying to assign to what, again?

Please leave Sup Forums and never come back. It is exceptional to get help with such an op and you still keep on rambling about your own stupidity

Min = Shit[i];

Not going to bother looking at your shitty ass code. This is why you have lecturers and classmates. Believe me, when they point out your mistake you're going to feel stupid as shit.
>Hurr durr it's not doing what I want, computer must be wrong
You might as well give up now and live the life of a normie, you're obviously not cut out for tech.

im having my middle school final exam in IT tomorrow and im training for it.

>asks for help
>gets fix for issue
"NO MR MY CODE IS NOT WRONG"

pooinloo

>no its not wrong
Shit[ i ] is going to become 0 and Min is going to stay 0 because it doesn't get any value other than its initialized value.

Also,
>if (Min > Shit[ i ])
Min is 0 and the numbers in Shit range from 3-56. This will never be true. You should start Shit at atleast 100.

Sorry, start Min at atleast 100.

5.30am.

then make it work for me, if you do that i apologize for being a tryhard faggot but until then fuck you.

POO IN LOO
O
O

I
N

L
O
O

duh! your logic is stupidly wrong ... between 3-57 does exists any number smaller than 0 ?

thank you.sorry for being a tryhard faggot.

Now apologise for being an idiot that thinks the framework and IDE are wrong. Now never do it again.

>replace int Min = 0; with int Min = 100;
>replace Shit[ i ] = Min; with Min = Shit[i];

thank you for helping me papa!