✅ C# Array Tutor needed. I'm lost in the sauce

Would anyone be willing to join me in a call and look at this array code with me and explain some thing and tell me what i'm doing wrong live on a call? could really use the tutorage. I just do not get arrays for some reason.
20 Replies
Thinker
Thinker2y ago
What are you struggling with specifically?
suddenly_toast
suddenly_toastOP2y ago
I had a for loop making a table but in this new module of the project we have to have it being made using arrays and im struggling to convert it
Pobiega
Pobiega2y ago
a table? thats not a well defined term in C# an array is essentially a fixed-size list of objects
suddenly_toast
suddenly_toastOP2y ago
column and row list
Pobiega
Pobiega2y ago
int[5] for example is an array of 5 integers
suddenly_toast
suddenly_toastOP2y ago
user defines the interval so the number of intergers varies that is one of the problems im facing
Pobiega
Pobiega2y ago
not a problem!
var numberFromUser = 10;
var myArray = new int[numberFromUser];
var numberFromUser = 10;
var myArray = new int[numberFromUser];
suddenly_toast
suddenly_toastOP2y ago
oh and we cant use var untill module 7 im on 4... just the rules by this professor
Pobiega
Pobiega2y ago
not a problem!
int numberFromUser = 10;
int[] myArray = new int[numberFromUser];
int numberFromUser = 10;
int[] myArray = new int[numberFromUser];
suddenly_toast
suddenly_toastOP2y ago
have to use int floats and strings float fh = getFluidHeight(i, density); float temp = getAirTemp(i); float airDensity = getAirDensity(i); float airPressure = getAirPressure(i, temp); float deltaP = SLPRESSURE - airPressure; Console.WriteLine(); Console.WriteLine("{0} {1} {2} {3} {4} {5}", i, temp, airDensity, airPressure, deltaP, fh);
Thinker
Thinker2y ago
(var isn't actually a type, but you'll learn about that later)
suddenly_toast
suddenly_toastOP2y ago
how did yall paste the code so neat?
Pobiega
Pobiega2y ago
$code
MODiX
MODiX2y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
suddenly_toast
suddenly_toastOP2y ago
ahh pobiega could you just take a look at this with me?
Pobiega
Pobiega2y ago
I believe thats what we are currently doing? 🙂
suddenly_toast
suddenly_toastOP2y ago
well mean can i share my screan haha so you can tell me where i fucked up lol\
Pobiega
Pobiega2y ago
Fine, #dev-vc-1
codesandplays
codesandplays2y ago
$codegif
Want results from more Discord servers?
Add your server