My issue
include <stdio.h>
int main() {
int year;
// your code goes here
scanf(“%d”, year);
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
printf("Leap year");
}
else
{
printf("Not a leap year");
}
}
what wrong in a c code
My code
#include <stdio.h>
int main() {
int year;
// your code goes here
scanf("%d", year);
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
printf("Leap year");
}
else
{
printf("Not a leap year");
}
}
Learning course: Learn C Programming
Problem Link: https://www.codechef.com/learn/course/rcpit-programming-c/RCPITLPC09/problems/LJAJAG23