Created
September 29, 2019 03:45
-
-
Save sugiartocokrowibowo/244884ccbe11e9a79a57966bb85b56a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.scanner; | |
public class LatihanArray003{ | |
public static void main(String[]amirul){ | |
Scanner sc = new Scanner(System.in); | |
System.out.print("Input Panjang Array Integer: "); | |
int p = sc.nextInt(); | |
int[] myArray; | |
myArray = new int[p]; | |
for(int k=0;k<myArray.length;k++){ | |
System.out.print("Input elemen myArray["+k+"]: "); | |
myArray[k] = sc.nextInt(); | |
} | |
for(int k=0;k<myArray.length;k++){ | |
System.out.println(myArray[k]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment