write an program in java to check if its a leap year or not
Answers
Answered by
2
import java.util.Scanner;
public class Year1
{
void main()
{
Scanner sc=new Scanner(System.in);
System.out.println("enter a no.");
int a=sc.nextInt();
if (a%100==0 && a%400==0)
System.out.println("leap year");
else if (a%100!=0 && a%4==0)
System.out.println("leap year");
else
System.out.println("non leap year");
}
}
Answered by
1
Answer:
hi my name is fury is ther any one who child help me with this two persons. they always answer themselves
Similar questions