Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. package java1.ex4;
  2. import java.util.Scanner;
  3. public class Java1Ex4 {
  4. public static void main(String[] args) {
  5. double y;
  6. Scanner in=new Scanner(System.in);
  7.  
  8. System.out.println("Ecrire l'année:");
  9. y=in.nextDouble();
  10. if(y % 4 == 0){
  11. if(y % 100 == 0){
  12. if(y % 400 == 0){
  13. System.out.println("Annee bissexstil");
  14. }
  15. else{
  16. System.out.println("Annee normal");
  17. }
  18. }
  19. else{
  20. System.out.println("Annee bissexstil");
  21. }
  22. }
  23. else{
  24. System.out.println("Annee normal");
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement