Sytang
New to C# (How to use while loops to check through multiple arrays)
First, this is a school assignment however I only need help with the specific issue in the title. I will paste the instruction regarding this specific task.
"This project will contain while loops to step through the dormData Array to find the selected dorm
and its price and to step through the meal Data Array to find the selected meal plan and price."
These are my arrays, the DormCostArray correalates with the DormListArray and the same for the MealPlanArray. If I want "Allen Hall" from the DormListArray, I want to make a while loop that will run through the DormCostArray until it gets to 1500. Both of these are the first elements in their arrays, but like I said I do not know how to make a loop to make it work. I can provide the entirety of the prompt as well as my code if needed but I just do not know where to go from here and don't have much experience reaching out to people on the interenet for help
37 replies