new semester, new repo structure

This commit is contained in:
2023-01-10 11:59:05 -06:00
parent 0a76658f85
commit ba6de6e18e
725 changed files with 1199 additions and 103 deletions

View File

@@ -0,0 +1,27 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package programmingexam1_calebfontenot;
import java.util.Scanner;
/**
*
* @author ar114
*/
public class LeapYear {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a year: ");
int year = input.nextInt();
// Check if the year is a leap year
boolean isLeapYear
= ((year % 4 == 0) && (year % 100 != 0 )|| (year % 400 == 0));
// Display the result
System.out.println(year + " is a leap year? " + isLeapYear);
}
}