text: Q:
  
  I am trying to calculate the day of the century but I am getting this error in unix:
  
  I am starting to learn how to use C++ and currently trying to calculate what day of the century one is in with the date they submit when running my program. I am getting an error but when looking up the error it says that there is nothing to output. I am using unix on my terminal application in mac os, so I'm not sure if that affects anything. I have walked through my program with a white board many times and am still lost. Thank you so much for reviewing my question. 
  Error:
  lab6.cpp: In function 'int day_of_century(int, int, int)':
  lab6.cpp:80:1: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  
  Code:
  #include <library.h>
  //global variables:
  
  int month = 0;
  int year = 0;
  int day = 0; //this day variable is for getting the day for a date
  int days = 0;//this days variable is for counting an amount of days
  int count = 1;
  //functions:
  
  int length_of_month(int month, int year) {
   if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
    cout << "31 Days" << endl;
   }//31 day if
   if (month == 4 || month == 6 || month == 9 || month == 11) {
    cout << "30 Days" << endl;
   }//30 day if
   if (month == 2) {
    if (year % 400 == 0 && year % 100 == 0) {
     cout << "29 Days" << endl;
    }//29 day if 1
   else  if (year % 4 == 0 && year % 100 == 0) {
     cout << "28 days" << endl;
    } // 28 days 1
   else if (year % 4 == 0) {
     cout << "29 days" << endl;
    } // 29 days 2
    else {
     cout << "28 Days" << endl;
    }//28 day else
   }//february
   return(0);
  }
  
  int length_of_month_value(int month, int year) {
   if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
    days = 31;  
   }//31 day if
   if (month == 4 || month == 6 || month == 9 || month == 11) {
    days = 30;
   }//30 day if
   if (month == 2) {
    if (year % 400 == 0 && year % 100 == 0) {
     days = 29;
    }//29 day if 1
   else  if (year % 4 == 0 && year % 100 == 0) {
     days = 28;
    } // 28 days 1
   else if (year % 4 == 0) {
     days = 29;
    } // 29 days 2
    else {
     days = 28;
    }//28 day else
   }//february
   return(days);
  }
  
  int day_of_year(int year, int month, int days) {
   if (month == 1) {
    days = day;
   }//if
   else {
    while (count < month) {
    days = days + length_of_month_value(count, year);
    count = count + 1;
    }//while
  // days = day + days;
   }//else
   return(days);
  }
  
  int day_of_century(int year, int month, int days) {
    if (year == 2000) {
    return(day_of_year(year, month, days));
   }
   else if (year > 0) {
    return(day_of_year(year - 1, 12, 31) + day_of_century(year - 1, month, days));
   }
  }
  
  int day_of_century(int year, int month, int days) {
  
  }
  
  //main function:
  int main() {
  //1: Length of Month:
   cout << "Please enter the month (numerically) with the year (numerically)  and this program will tell you how many days are in that month" << endl;
   cout << "Month: ";
   cin >> month;
   cout << endl << "Year: ";
   cin >> year;
   cout << endl;
   length_of_month(month, year);
   cout << endl;
  
  //2: Day of the Year:
   year = 0;
   month = 0;
   days = 0;
   day = 0;
   cout << "Please enter the year, month, and day, and this program will tell you what day of the year that date is." << endl;
   cout << "Year: ";
   cin >> year;
   cout << endl << "Month: ";
   cin >> month;
   cout << endl << "Day: ";
   cin >> day;
   cout << "You are in day " <<  day_of_year(year, month, day) << " of the year." <<  endl;
  // day_of_year(year, month, day);
  // cout << days+day;
   cout << endl;
  
  //3: Day of the Century:
   year = 0;
   month = 0;
   days = 0;
   day = 0;
   count = 1;
   cout << "Please enter the year, month, and day, and this program will tell you what day of the century that date is in. This program only stays in this current century so please pick a year between 2000 and 2099." << endl;
   cout << "Year: ";
   cin >> year;
   cout << endl << "Month: ";
   cin >> month;
   cout << endl << "Day: ";
   cin >> day;
   cout << "You are in day " <<  day_of_century(year, month, day) << " of the century." <<  endl;
  
  return(0);
  }
  
  A:
  
  I think you might want to reorganize your day_of_century function. For example, if you have year != 2000 or year<=0 then you have a problem. To solve the problem you need a return of type int outside all of the if statements inside your function (considered to be the default return, similar to a switch case)
  
  