Skip to content

Instantly share code, notes, and snippets.

@zalviandyr
Last active August 11, 2022 12:34
Show Gist options
  • Save zalviandyr/1778df35e1cd79a30117bb927289ed28 to your computer and use it in GitHub Desktop.
Save zalviandyr/1778df35e1cd79a30117bb927289ed28 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Mahasiswa {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String nama, kelas, jurusan;
System.out.print("Nama: ");
nama = scanner.nextLine();
System.out.print("Kelas: ");
kelas = scanner.nextLine();
System.out.print("Jurusan: ");
jurusan = scanner.nextLine();
System.out.println("Mahasiswa");
System.out.println("Nama\t: " + nama);
System.out.println("Kelas\t: " + kelas);
System.out.println("Jurusan\t: " + jurusan);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment