Code:
#include <stdio.h>
#include <cs50.h>
int
main(int argc, char * argv[])
{
int x, gotOne = 0;
do {
printf("Enter a year: ");
x = GetInt();
if( ((x % 4 == 0) && (x % 100 != 0)) || (x % 400 == 0) ) {
printf("The Year is a Leap Year");
gotOne = 1;
}
else
printf("The Year is Not a Leap Year");
}while(gotOne == 0);
return 0;
}
A do loop will *always* be entered into, once. A while loop, may or may not be entered into, once (since the conditional test is done right at the top of the loop).
Just fyi.
Welcome to the forum, and I hope you enjoy the tutorial you found.