23 ott 2013

JavaApplication3

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication30;

/**
 *
 * @author USER
 */
public class JavaApplication30 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int calcolo;
        int v[]={3,6,7,2,9,10,6,4};
        for (int i=7; i>1; i--)
        {
            calcolo=v[0]+v[i];
            System.out.println("somma del priomo elemento con i"+i+" "+calcolo);
        }
    }
}

Nessun commento:

Posta un commento