using System;
class JaggedTest {
static void Main(string[] args) {
int[][] jarr = new int[3][];
int s = 0;
for (int i = 0; i < 3; i++) {
Console.WriteLine("Enter the Size of the Array" + (i + 1));
int n = Convert.ToInt16(Console.ReadLine());
jarr[i] = new int[n];
Console.WriteLine("Enter the Values of Array " + (i + 1));
for (int j = 0; j < n; j++) {
jarr[i][j] = Convert.ToInt16(Console.ReadLine());
s = s + jarr[i][j];
}
n = n + 0;
}
Console.WriteLine("Sum= " + s);
Console.ReadKey();
}
}This program is used to understand the Jagged array in C#.
