package exercicio; import javax.swing.JOptionPane;
public class Exercicio {
public static void main(String args []) {
int tamanho = Integer.parseInt(JOptionPane.showInputDialog("Digite um numero:"));
float vetor [] = new float [tamanho];
int x [] = new int [tamanho];
float soma;
for (int i = 1; i < vetor.length; i++){
x[1] = 1;
x [i] = x[i-2] + x[i-1];
soma = x [i];
JOptionPane.showMessageDialog(null,"Valores:" +soma);
}}} Tentei fazer assim mas não deu certo!