Advertisement
nessaqzp

Program Umur di Tahun 2019

Sep 15th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Coba
  3. {
  4. public static void main(String[] args) {
  5. Scanner input = new Scanner(System.in);
  6. int tahunLahir;
  7. System.out.print("Masukkan tahun lahir Anda : ");
  8. tahunLahir=input.nextInt();
  9. int umurSekarang = 2019 - tahunLahir;
  10. System.out.println("Umur Anda sekarang adalah : " + umurSekarang);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement