public class Data {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int i;
int [] data= new int[5];
for (i=0;i<5;i++)
{
System.out.println("data ke"+i+"=");
data[i]=input.nextInt();
}
System.out.println("data array");
for (i=0;i<5;i++)
{
System.out.println (" "+data [i]);
}
}
}
0 komentar:
Posting Komentar