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); } } }
Brandon Diaz
>>Sup Forumsdpt/
Ryder Lewis
POO
Michael Smith
reformat and put this shit between code tags.
Lincoln Russell
You know that .net is a framework right? You are not really using it in the code provided. It's your own stupidity.
Jason Clark
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?
Kevin Johnson
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...
Hunter Foster
>The code doesn't do what I think it should do >Lets just blame the computer and the IDE
Ryder Jenkins
poo
Connor Carter
no its not wrong.look at it again.and yes im an undergraduate
Jose Morales
The condition is also wrong
Caleb Rodriguez
Trust me. It is wrong.
Bentley Cooper
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.
Alexander Taylor
how so?
Mason Martinez
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
Caleb Hill
What are you trying to assign to what, again?
Leo Edwards
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
Cooper Moore
Min = Shit[i];
Luke Cook
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.
Anthony Hill
im having my middle school final exam in IT tomorrow and im training for it.
Adrian Collins
>asks for help >gets fix for issue "NO MR MY CODE IS NOT WRONG"
pooinloo
Evan Ortiz
>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.
Logan Rodriguez
Sorry, start Min at atleast 100.
5.30am.
Sebastian Turner
then make it work for me, if you do that i apologize for being a tryhard faggot but until then fuck you.
Charles Lee
POO IN LOO O O
I N
L O O
Jaxson Hall
duh! your logic is stupidly wrong ... between 3-57 does exists any number smaller than 0 ?
Brody Carter
thank you.sorry for being a tryhard faggot.
Elijah Wilson
Now apologise for being an idiot that thinks the framework and IDE are wrong. Now never do it again.
Isaac Wright
>replace int Min = 0; with int Min = 100; >replace Shit[ i ] = Min; with Min = Shit[i];