0

Why I have syntax error?!

using System; namespace SoloLearn { public class Program { public static void Main() { int licznik = 1; int[][] tab = new int[4][]; tab[0] = new int[4]; tab[1] = new int[2]; tab[2] = new int[1]; tab[3] = new int[3]; for(int i = 0; i < tab.Lenght; i++;) { for(int j = 0; j < tab[i].Lenght; j++;) { tab[i][j] = licznik++; Console.WriteLine("tab[{0}][{1}] = {2}"i,j,tab[i][j]); } } } } }

26th May 2019, 5:45 AM
Masterpizza100
Masterpizza100 - avatar
11 Respuestas
+ 1
Thanks! It worket.
2nd Jun 2019, 8:55 AM
Masterpizza100
Masterpizza100 - avatar
0
I have semi-colons after all increments.
2nd Jun 2019, 8:24 AM
Masterpizza100
Masterpizza100 - avatar
0
I don't have syntax error any more. I have')' and'}' expected.
2nd Jun 2019, 8:39 AM
Masterpizza100
Masterpizza100 - avatar
0
using System; namespace SoloLearn { public class Program { public static void Main() { int licznik = 1; int[][] tab = new int[4][]; tab[0] = new int[4]; tab[1] = new int[2]; tab[2] = new int[1]; tab[3] = new int[3]; for(int i = 0; i < tab.Length; i++;) { for(int j = 0; j < tab[i].Length; j++;) { tab[i][j] = licznik++; Console.WriteLine("tab[{0}][{1}] = {2}",i,j,tab[i][j]); } } } } }
2nd Jun 2019, 8:43 AM
Masterpizza100
Masterpizza100 - avatar