c++ calendar

I have trouble executing this source code I did.
So, when the user enters V or v, a menu allows the user to choose which calendar view will be displayed: either day, week, or month.

When the user selects D or d, the user is asked to input a date value. The input
of the user for the date value is a single integer only. Assume that the format is
mmddyyyy.

The program ends if and only if the user selected the E or e option from the main
menu.

Assume the calendar is valid starting from January 1, 1900. Dates before that
considered invalid and the application will not generate calendars for them.


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
  int main ()
{
    int x, y, year, day, month;
    char v, V, e, E, d, D;
    
    year=x%10000;
    day = x%1000000/10000;
	month = x/1000000;
    
    if (year < 1900 && year > 0)
    printf("Invalid!\n");
    else
{   printf("  Calender Menu\n\n");
    printf("Display Calendar\n");
    printf("   View Format\n");
    printf("    Exit\n\n");
    printf("Enter Your Choice: ");
}

     if (y == 'd' || y =='D')
     {printf("Enter a date specified: ");
     scanf("%c", &y);}
     if (y == 'V' || y == 'v')
     {printf("Enter a date, week, or month: ");
     scanf("%c%c%c", &month, &day, &year);}
     if (y == 'E' || y == 'e')
     
     return 0;
Please Dont double Post, You're Topic is continued here - http://www.cplusplus.com/forum/beginner/162086/
Topic archived. No new replies allowed.