December 2019 1 54 Report
Yang ngerti coding java tolong dong tambahkan multidimensional array, terima kasih


package latihanalp;

import java.util.Scanner;
public class LatihanAlp {

public static void main(String[] args) {
Scanner input = new Scanner ( System.in);
System.out.println("Jumlah Nasabah : ");
int n = input.nextInt();
String nasabah[] = new String[n];
for (int i = 0; i < n; i++) {
System.out.println("Nama Nasabah Ke-" +(i+1) );
nasabah[i] = input.next();
}
System.out.println("Berikut Nomor Antrian: ");
for (int i = 0; i < n; i++) {
System.out.println("Antrian Ke-"+ (i+1) + ": " + nasabah[i]);
}


}

}

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.