Problem 11

3 comments on “Problem 11”


  • swapnil

    public class leapYear {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    if(n%4==0) {
    if(n%100==0) {
    if(n%400==0) {
    System.out.println(“leap year”);
    }else {
    System.out.println(” not leap year”);

    }
    }else {
    System.out.println(“leapyear”);

    }
    }else {
    System.out.println(“not leap year”);
    }

    }
    }


  • Shivam

    year = int(input())
    if((year%4==0 or year%100==0) or(year%100==0 and year %400 == 0)):
    print(year, “is a leap year”)
    else:
    print(year,”is not a leap year”)


  • Mohd Saif

    #python

    n=int(input(“Enter the year:\n”))
    if(n%4==0):
    if(n%100==0):
    if(n%400==0):
    print(f”{n} is a Leap year”)
    else:
    print(f”{n} is not a Leap year”)
    else:
    print(f”{n} is a Leap year”)
    else:
    print(f”{n} is not a Leap year”)