Write a java program that reads 10 numbers from the user. After reading each number, print all the numbers that have been entered so far.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package BASICJAVA;
import java.util.Scanner;
/**
*
* @author ABIR
*/
public class Print_Till_Enterd {
public static void main(String[]args){
Scanner abir =new Scanner(System.in);
int[] number=new int[5];
for (int i = 0; i < number.length; i++) {
System.out.println("Enter your "+(i+1)+" number");
number[i]=abir.nextInt();
System.out.println("Till Now You Enterd");
//System.out.println("");
for (int j = 0; j <= i; j++) {
System.out.println(number[j]);
}
}
}
}