Row sums of a matrix
C# Loops
nested loops
Flowchart (ISO 5807)
Source code
class Program {
static void RowSums(int[][] a, int n) {
for (int i = 0; i < n; i++) {
int s = 0;
for (int j = 0; j < n; j++) {
s = s + a[i][j];
}
System.Console.WriteLine(s);
}
}
}