Skip to content

Instantly share code, notes, and snippets.

@Furkan-Gulsen
Created April 18, 2022 18:55
Show Gist options
  • Save Furkan-Gulsen/3ef7bcf1a54f8dac04ce000055bd1733 to your computer and use it in GitHub Desktop.
Save Furkan-Gulsen/3ef7bcf1a54f8dac04ce000055bd1733 to your computer and use it in GitHub Desktop.
package Giris;
import java.util.Scanner;
public class Baslangic {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Yılı Giriniz: " );
int yil=scanner.nextInt();
if(yil%4==0) {
if(yil%100==0&&!(yil%400==0)) {
System.out.println(yil + " bir artık yil degildir !");
} else {
System.out.println(yil + " bir artık yıldır !");
}
} else {
System.out.println(yil+" bir artık yil degildir !");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment