Computer Science, asked by saniaseraj, 1 year ago

if else programs with solution.. no loop plz

Answers

Answered by AKASHDIPDAS
0
import java.util.Scanner;
public class SAFETY
{
public static void main()
{
Scanner in=new Scanner(System.in);
int year;
year=in.nextInt();
if (year % 4 == 0 && year % 100 == 0)
System.out.println("It is a century leap year");
else
System.out.println("It is not a leap year");
}
}
Similar questions