viewing paste Unknown #9671 | Java

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package nyaa;
 
public class Sandwich 
{
    public static void main (String[] args)
    {
        int[] values = {1,2,3,4,5,6,7,8,9,10};  
        
        for(int i=0; i < values.length; i++)
        {
            System.out.println(getSquare(values[i]));
        }
    }
    public static int getSquare(int n) 
    {
        return n*n;
    }
}
Viewed 943 times, submitted by Guest.