if else programs with solution.. no loop plz
Answers
Answered by
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");
}
}
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