Search found 1 match

by mh_sagar
Sat Apr 09, 2016 5:15 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 84156

Re: 10070 - Leap Year or Not Leap Year and ...

whats wrong with my code
#include<stdio.h>

int main()
{
int year;
while(scanf("%d",&year)!=EOF){

if(year<2000){
printf("Year should be greater than 2000\n");
}
else{
if(year%400==0 || (year%100!=0 && year%4==0)){
printf("This is a leap year\n");
}
else{
printf("This is a ordinary year ...

Go to advanced search