View Code of Problem 28

#include "stdio.h"
int main(int argc, char const *argv[])
{
	int year;
	while (scanf("%d",&year)!=EOF&&year>0);
	{
		if ((year%4==0&&year%100!=0)||year%400=0)
		{
			printf("Leap Year\n");
		}
		else
		{
			printf("Not Leap Year\n");
		}
	}

	return 0;
}
/*
Main.c: In function 'main':
Main.c:7:41: error: lvalue required as left operand of assignment
   if ((year%4==0&&year%100!=0)||year%400=0)
                                         ^
*/

Double click to view unformatted code.


Back to problem 28