## Calendar-like day calculator

Hello, I am working on something like Day calculator. Your input is how often does something happen (example: every 2 weeks). And it's gonna print out Dates in every month for whole year. I am looking for help please.

Code:
#include <stdio.h>#include <stdlib.h>
#include <stdbool.h>

int year, month, daysInMonth, day, weekDay = 0, startingDay;
char *months[] = {"January","February","March","April","May","June","July","August","September","October","November","December"};
int monthDay[] = {31,28,31,30,31,30,31,31,30,31,30,31};
int monthMonth[] = {1,1,2,3,4,5,6,7,8,9,10,11,12};
int repeater;
int beginDay;
int monthNum;
bool first = true;

void start() {
printf("Enter number of year\n");
scanf("%d", &year);
}

int get_1st_weekday(int year) {
day = (((year - 1) * 365) + ((year - 1) / 4 ) - ((year - 1) / 100) + ((year) / 400) + 1) % 7;
return day;
}

void printCalendarD() {
if ((year%4 == 0 && year%100 != 0) || year%400 == 0) {
monthDay[1] = 29;
}
startingDay = get_1st_weekday(year);
for (month = 0; month < 12; month++) {
daysInMonth = monthDay[month];
printf("\n\n----------------%s----------------\n", months[month]);
printf("\n  Sun  Mon  Tue  Wed  Thu  Fri  Sat\n");
for (weekDay = 0; weekDay<startingDay;weekDay++)
printf("     ");
for (day = 1; day <= daysInMonth; day++) {
printf("%5d", day);

if (++weekDay > 6) {
printf("\n");
weekDay = 0;
}
startingDay = weekDay;
}
}
}

void printCalendar() {
for (month = 0; month < 12;) {
daysInMonth = monthDay[month];
if (first == true) {
month++;
for (day = beginDay; day <= daysInMonth; day++) {
first = false;
printf("%d.%d\n", day, monthMonth[month]);
}
}
if (first == false) {
month++;
for (day = 1; day <= daysInMonth; day++) {
printf("%d.%d\n", day, monthMonth[month]);
}
}
}
}

int main()
{
start();
printCalendarD();
printf("\n\n\n");
printf("Enter repeater value: ");
scanf("%d", &repeater);
printf("The value of a repeater is %d.\n", repeater);
printf("Enter number of beginning day: ");
scanf("%d", &beginDay);
printf("Day of the beginning is %d.\n", beginDay);
printCalendar();

printf("\n\n\n");
return 0;
}