Jagged array If statement

Hello Guys, I’m doing a VB.net project about exam schedule system. I am stuck in the part where i have to use an jagged array to show the time conflict. the jagged array output will be something like this 1000 1010 1011 1010 where 1 means there is time conflict for the students and 0 means there available for taking the exam. using the information from the jagged array i should be able to set the time and date of the exam. Your cooperation will be highly appreciated.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://freecodecamp.org.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

Thank you for replying.
This is If Statement we are working on.

Dim JaggedArray As Integer()() = New Integer(3)() {}
        JaggedArray(0) = New Integer(2) {1, 2, 3}
        JaggedArray(1) = New Integer(1) {1, 4}
        JaggedArray(2) = New Integer(2) {5, 6, 7}
        JaggedArray(3) = New Integer(1) {8, 9}
        Console.WriteLine("Printing the Elements")
        For x As Integer = 0 To 3
            For y As Integer = 0 To JaggedArray(x).Length - 1
             For z as integer = 0 to jaggedArray(y).length - 1   
               if jaggedarray(z) = jaggedarray(y) then
			console.writeline("Has conflict")
                End If





Basically what i want is to print a message says that there is a conflict after looping it will check each array if it has the same value for example array 0 have number one and array 1 have the same value.

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


So uh… what now ? what do i do exactly with my code after i edited the post ?