Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package java1.ex4;
- import java.util.Scanner;
- public class Java1Ex4 {
- public static void main(String[] args) {
- double y;
- Scanner in=new Scanner(System.in);
- System.out.println("Ecrire l'année:");
- y=in.nextDouble();
- if(y % 4 == 0){
- if(y % 100 == 0){
- if(y % 400 == 0){
- System.out.println("Annee bissexstil");
- }
- else{
- System.out.println("Annee normal");
- }
- }
- else{
- System.out.println("Annee bissexstil");
- }
- }
- else{
- System.out.println("Annee normal");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement