String giving wrong output

Ok so i making a program that by entering a date of birth it will give following output
You were born on the [day] of the [month] in the [if {year} is greater than 2000 ] 21st ceentury [else] 20th century

So the code is fallowing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <iostream>
#include <cstdio>
#include <cstdlib>

using namespace std;

int main (int nNumberofArgs, char* pszArgs [] )

{
    int day;
    int month;
    int year;
    cout << "Please Enter the day of the month you were born in: ";
    cin >> day;
    cout << "Please enter the number corresbonding to the month you were born in: ";
    cin >> month;
    cout << "Please enter the year you were born in: ";
    cin >> year;

    const std::string days[] = { "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eight", "nineth", "tenth", "eleventh",
  "Twelveth", "thirteenth", "Fourteenth", "Fiftheenth", "sixteenth", "sevententh", "Eighteenth", "Nineteenth", "twenteeth", "Twenty-first",
  "Twenty-Second", "twenty-third", "twenty-fourth", "Twenty-fifth", "Twenty-sixth", "Twenty-Seventh", "Twenty-eight", "Twnety-ninth", "Thirthyth",
   "Thirthyth-First" };

   const std::string months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October",
 "November", "December"};

 if (year > 2000)
 {
     std::cout << "You where born on the " << days[day - 1] << " of " << months[month - 1] << " In the 20th century" << std::endl;
}
else
{
    std::cout << "You where born on the  " << days[day - 1] << " of " << months[month - 1] << " In the 21th century" << std::endl;
}

system ("PAUSE");
 return 0;
 }


but when i put in year 2001 i get
You where born on the fifth of May In the 20th century"

whats wrong with my code ?
exchange line 34 and 30
Topic archived. No new replies allowed.