Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package introducaoia; import java.util.ArrayList; import javax.swing.JOptionPane; /** * * @author marco.silva2 */ public class IntroducaoIA { static long x,y; /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here x = Long.parseLong(JOptionPane.showInputDialog("Informe o valor de X: ")); y = Long.parseLong(JOptionPane.showInputDialog("Informe o valor de Y: ")); System.out.println("O MDC de: "+ x + " e "+ y +" é: "+ Mdc.mdc(x, y)); System.out.println("Os 7 Primeiros numero da sequencia fibonacci de: "+ x + " sao: \n"); for (int i = 0 ; i < 8; i++) { System.out.print("(" + i + "):" + Fibonacci.fibo(i) + "\t"); //x++; } ArrayList origem = new ArrayList(); for(int i = 0; i < 6; i++){ origem.add(Integer.parseInt(JOptionPane.showInputDialog("Informe o valor da posicao "+ i +" do Array"))); } System.out.println("\n" +origem); int a = Integer.parseInt(JOptionPane.showInputDialog("informe a posicao da origem")); int b = Integer.parseInt(JOptionPane.showInputDialog("informe a posicao do fim")); ArrayList retorno = Divide.div(origem, a,b); System.out.println(retorno); } }
Compartilhar