Ok, I think I got it. I wasn't sure exactly how to write out like "if year is divisible by 4" ect., but I think I got it now. Here is what I came up with
Code:
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
// Display Instructions
printf("Leap years can be defined as any year divisible by 4 (except any year divisible by 100 but not 400. Enter a year below to find out if it if a leap year.");
//Input: year
int year;
printf("\n\nEnter the year:");
scanf("%d", &year);
fflush(stdin);
//Figure out whether the year is a leap year or not.
if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))
printf("\n%d is a Leap Year.", year);
else
printf("\n%d is not a Leap Year.", year);
getchar ();
return 0;
}
Thanks for the help Prelude, Kivork, and relyt_123. You guys helped me out a bunch. Atleast I now know a little bit more about programming.