// Rob Gross
// Midterm
// 3/11/02
// Due Thursday


#include <iostream>
using namespace std;

int main ()

{
int days [12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int difference;
int fmonth;
int fdate;
int smonth;
int sdate;

cout << "Enter your first Month and Date: " << endl;
cin >> fmonth >> fdate;
cout << "Enter your second Month and Date: " << endl;
cin >> smonth >> sdate;

difference = (days [fmonth - 1] - fdate);

cout << difference << " days between the dates. " << endl;

return 0;
}

My computer crashes on this line

difference = (days [fmonth - 1] - fdate);

what is wrong is that I have it set to nothing.

The point of this project is to calculate the number of days that the user enters when they enter a month and a date twice.

You understand?