I want to assign true to the boolean variable leapYear if the integer variable year is a leap year (A leap year is a multiple of 4, and if it is a multiple of 100, it must also be a multiple of 400.)in a c program
Here's the code I tried.
bool leapYear;
int year;
printf("Enter a year ");
scanf("%d", &year);
if (year %4 = 0 || year %100 = 0 || year %400 = 0)
printf("true");
I tried to compile the code I wrote but it gives an error saying unknown type name 'bool'.