Menghitung Tahun Kabisat

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package tugas05;
import java.util.Scanner;
/**
*
* @author Imamuddin.A.
*/
public class TahunKabisat {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int tahun = 0;
System.out.println(“Masukan Tahun : “);
tahun = input.nextInt();
int thn = tahun % 4;
if (thn == 0){
System.out.println(“Leap Year”);
}else{
System.out.println(“Not Leap Year”);
}

// TODO code application logic here
}

}

Tinggalkan sebuah Komentar

Belum ada komentar.

Komentar RSS Lacak Balik URI Pengenal

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.