// file SommaArray.java
public class SommaArray
{	static int somma(int[] v)
	{	int s = 0;
		for (int i = 0; i < v.length; i++) s += v[i];
		return s;
	}
	static public void main(String[] args)
	{	int[] a = { 1, 2, 3 },
		      b = { 11, 12, 13, 14, 15 };
		// ...
		Console.scriviIntero (somma(a));
		Console.scriviIntero(somma(b));
		// ...
	}
}
