├── README.md └── main code /README.md: -------------------------------------------------------------------------------- 1 | # Implementing-Control-Statements---Determining-a-year-leap-or-Not-oops- 2 | In this section, we describe the implementation of control statements in Python to determine whether a given year is a leap year. This task is a common exercise in understanding control flow, which includes if-else statements and logical operators 3 | -------------------------------------------------------------------------------- /main code: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class CheckYear 4 | { 5 | public static void main(String []args) 6 | { 7 | Scanner sc=new Scanner(System.in); 8 | int year; 9 | 10 | System.out.println("Enter the year"); 11 | year=sc.nextInt(); 12 | 13 | if(((year % 4 == 0) && (year % 100 != 0)) || 14 | (year % 400 == 0)) 15 | System.out.println(year+" is a leap year"); 16 | else 17 | System.out.println(year+" is not a leap year"); 18 | } 19 | } 20 | --------------------------------------------------------------------------------