23 ott 2013

effetti ottici


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);
        }
    }
}

22 ott 2013

javaapplication 2

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

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

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int n =1000;
        int v[]= new int[n];
        int valore=10000;
        for(int i=0;i        {v[i]=valore;
        valore++;
        }
        for(int ni=0; ni            if(v[ni]%5==0)
            {
                System.out.println("*"+v[ni]+"*");
            }else{
                System.out.println("elemento i="+ni+":"+v[ni]);