public class dat {
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]);
}
System.out.println("data array 2=");
for (i=4;i>=0;i--)
{
System.out.println(" "+data[i]);
}
}
}
0 komentar:
Posting Komentar