-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.java
26 lines (23 loc) · 1.05 KB
/
main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.Scanner;
public class main{
public static void main(String[] args){
String nama,kelas;
int tahun, umur;
Scanner dataScanner = new Scanner(System.in);
Scanner input = new Scanner(System.in);
System.err.println("MASUKAN NAMA \t:");
nama = dataScanner.nextLine();
System.err.println("MASUKAN KELAS \ta:");
kelas = dataScanner.nextLine();
System.err.println("MASUKAN TAHUN \t:");
tahun = input.nextInt();
umur = (2024-tahun);
System.out.println("==========================================================");
System.out.println(" KARTU DATA SISWA SMK BAKTI IDHATA");
System.out.println("==========================================================");
System.out.println("NAMA ANDA \t: " + nama);
System.out.println("KELAS ANDA \t: " + kelas);
System.out.println("UMUR ANDA \t: " + umur);
System.out.println("==========================================================");
}
}