Построение вечного календаря

Автор: Пользователь скрыл имя, 04 Мая 2013 в 00:36, курсовая работа

Краткое описание

Широкое проникновение информационных технологий во все сферы человеческой деятельности предъявляет повышенные требования к компьютерной подготовке специалистов в высших учебных заведениях. Изначально вычислительные машины были созданы для решения сложных инженерных и математических задач и, несмотря на значительное расширение сферы их применения, это направление их использования остается главным. Но теперь также в сферу использования вычислительной техники входит и решение всяких второстепенных задач, таких как построение калькуляторов и календарей, нацеленных, прежде всего, на удобства пользователя.

Оглавление

ВВЕДЕНИЕ..………………………………………………………………….5
1 ПОСТАНОВКА ЗАДАЧИ И СРЕДА ЕЁ ИСПОЛЬЗОВАНИЯ………….7
2 ТЕОРЕТИЧЕСКИЕ СВЕДЕНИЯ.…………………………………………8
3 ОСНОВНОЙ АЛГОРИТМ………………………………………………..13
4 ОСОБЕННОСТИ РЕАЛИЗАЦИИ НА ЯЗЫКЕ С++..…………………...16
5 ИНСТРУКЦИЯ ПО ИСПОЛЬЗОВАНИЮ.……………………………...21
ВЫВОДЫ……………………………………………………………………22
СПИСОК ИСПОЛЬЗУЕМЫХ ИСТОЧНИКОВ…………………………..23
Приложение А Текст программы………………………………………….24

Файлы: 1 файл

Вечный%20календарь.%20Курсовой%20проэкт.doc

— 214.50 Кб (Скачать)

                        case 4:d=0;goto day; break;

                        case 5:d=2;goto day; break;

                        case 6:d=5;goto day; break;

                        case 7:d=0;goto day; break;

                        case 8:d=3;goto day; break;

                        case 9:d=6;goto day; break;

                        case 10:d=1;goto day; break;

                        case 11:d=4;goto day; break;

                        case 12:d=6;goto day; break; };

};

if ((god-3)%28==0) {switch (m)

                      { case 1:d=2; goto day; break;

                        case 2:d=5; goto day; break;

                        case 3:d=5; goto day; break;

                        case 4:d=1; goto day; break;

                        case 5:d=3;goto day; break;

                        case 6:d=6;goto day; break;

                        case 7:d=1;goto day; break;

                        case 8:d=4;goto day; break;

                        case 9:d=0;goto day; break;

                        case 10:d=2;goto day; break;

                        case 11:d=5;goto day; break;

    case 12:d=0;goto day; break;  };

};

if ((god-4)%28==0) {switch (m)

                      { case 1:d=3;goto day; break;

                        case 2:d=6;goto day; break;

                        case 3:d=0;  goto day; break;

                       case 4:d=3;goto day; break;

                        case 5:d=5;goto day; break;

                        case 6:d=1;goto day; break;

                        case 7:d=3;goto day; break;

                        case 8:d=6;goto day; break;

                        case 9:d=2;goto day; break;

                        case 10:d=4;goto day; break;

                        case 11:d=0;goto day; break;

                        case 12:d=2;goto day; break; };

};

if ((god-5)%28==0) {switch (m)

                      { case 1:d=5;goto day; break;

                        case 2:d=1;goto day; break;

                        case 3:d=1;goto day; break;

                        case 4:d=4;goto day; break;

                        case 5:d=6;goto day; break;

                       case 6:d=2;goto day; break;

                        case 7:d=4;goto day; break;

                        case 8:d=0;goto day; break;

                        case 9:d=3;goto day; break;

                        case 10:d=5;goto day; break;

                        case 11:d=1;goto day; break;

                        case 12:d=3;goto day; break; };

};

if ((god-6)%28==0) {switch (m)

                      { case 1:d=6;goto day; break;

                        case 2:d=2;goto day; break;

                        case 3:d=2;goto day; break;

                        case 4:d=5;goto day; break;

                        case 5:d=0;goto day; break;

                        case 6:d=3;goto day; break;

                        case 7:d=5;goto day; break;

                       case 8:d=1;goto day; break;

                        case 9:d=4;goto day; break;

                        case 10:d=6;goto day; break;

                        case 11:d=2;goto day; break;

                        case 12:d=4;goto day; break; };

};

if ((god-7)%28==0) {switch (m)

                      { case 1:d=0;goto day; break;

                        case 2:d=3; goto day; break;

                        case 3:d=3;goto day; break;

                        case 4:d=6;goto day; break;

                        case 5:d=1;goto day; break;

                        case 6:d=4;goto day; break;

                        case 7:d=6;goto day; break;

                        case 8:d=2;goto day; break;

                        case 9:d=5;goto day; break;

                        case 10:d=0;goto day; break;

                        case 11:d=3;goto day; break;

                        case 12:d=5;goto day; break; };

};

if ((god-8)%28==0) {switch (m)

                      { case 1:d=1; goto day; break;

                        case 2:d=4;goto day; break;

                        case 3:d=5;goto day; break;

                        case 4:d=1;goto day; break;

                        case 5:d=3;goto day; break;

                        case 6:d=6;goto day; break;

                        case 7:d=1;goto day; break;

                        case 8:d=4;goto day; break;

                        case 9:d=0; goto day; break;

                        case 10:d=2;goto day; break;

                        case 11:d=5;goto day; break;

   case 12:d=0;goto day; break; };

};

if ((god-9)%28==0) {switch (m)

                      { case 1:d=3; goto day; break;

                        case 2:d=6;goto day; break;

                        case 3:d=6;goto day; break;

                        case 4:d=2;goto day; break;

                        case 5:d=4;goto day; break;

                        case 6:d=0;goto day; break;

                        case 7:d=2;goto day; break;

                        case 8:d=5;goto day; break;

                        case 9:d=1; goto day; break;

                        case 10:d=3;goto day; break;

                        case 11:d=6;goto day; break;

   case 12:d=1;goto day; break; };

};

if ((god-10)%28==0) {switch (m)

                      { case 1:d=4; goto day; break;

                        case 2:d=0;goto day; break;

                        case 3:d=0;goto day; break;

                        case 4:d=3;goto day; break;

                        case 5:d=5;goto day; break;

                        case 6:d=1;goto day; break;

                        case 7:d=3;goto day; break;

                        case 8:d=6;goto day; break;

                        case 9:d=2; goto day; break;

                        case 10:d=4;goto day; break;

                        case 11:d=0;goto day; break;

   case 12:d=2;goto day; break; };

};

if ((god-11)%28==0) {switch (m)

                      { case 1:d=5; goto day; break;

                        case 2:d=1;goto day; break;

                        case 3:d=1;goto day; break;

                        case 4:d=4;goto day; break;

                        case 5:d=6;goto day; break;

                        case 6:d=2;goto day; break;

                        case 7:d=4;goto day; break;

                        case 8:d=0;goto day; break;

                        case 9:d=3; goto day; break;

                        case 10:d=5;goto day; break;

                        case 11:d=1;goto day; break;

    case 12:d=3;goto day; break; };

};

if ((god-12)%28==0) {switch (m)

                      { case 1:d=6; goto day; break;

                        case 2:d=2;goto day; break;

                        case 3:d=3;goto day; break;

                        case 4:d=6;goto day; break;

                        case 5:d=1;goto day; break;

                        case 6:d=4;goto day; break;

                        case 7:d=6;goto day; break;

                        case 8:d=2;goto day; break;

                        case 9:d=5; goto day; break;

                        case 10:d=0;goto day; break;

                        case 11:d=3;goto day; break;

    case 12:d=5;goto day; break; };

};

if ((god-13)%28==0) {switch (m)

                      { case 1:d=1;goto day; break;

                        case 2:d=4;goto day; break;

                        case 3:d=4;goto day; break;

                        case 4:d=0;goto day; break;

                        case 5:d=2;goto day; break;

                        case 6:d=5;goto day; break;

                        case 7:d=0;goto day; break;

                        case 8:d=3;goto day; break;

                        case 9:d=6;goto day; break;

                        case 10:d=1;goto day; break;

                        case 11:d=4;goto day; break;

                        case 12:d=6;goto day; break; };

};

if ((god-14)%28==0) {switch (m)

                      { case 1:d=2;  goto day; break;

                        case 2:d=5;goto day; break;

                        case 3:d=5;goto day; break;

                        case 4:d=1;goto day; break;

                        case 5:d=3;goto day; break;

                        case 6:d=6;goto day; break;

                        case 7:d=1;goto day; break;

                        case 8:d=4;goto day; break;

                        case 9:d=0;goto day; break;

                        case 10:d=2;goto day; break;

                        case 11:d=5;goto day; break;

                        case 12:d=0;goto day; break; };

};

if ((god-19)%28==0) {switch (m)

                      { case 1:d=1;goto day; break;

                        case 2:d=4;goto day; break;

                        case 3:d=4;goto day; break;

                        case 4:d=0;goto day; break;

                        case 5:d=2;goto day; break;

                        case 6:d=5;goto day; break;

                        case 7:d=0;goto day; break;

                        case 8:d=3;goto day; break;

                        case 9:d=6;goto day; break;

                        case 10:d=1;goto day; break;

                        case 11:d=4;goto day; break;

                        case 12:d=6;goto day; break; };

};

 

if ((god-15)%28==0) {switch (m)

                      { case 1:d=3;  goto day; break;

                        case 2:d=6;goto day; break;

                        case 3:d=6;goto day; break;

                        case 4:d=2;goto day; break;

                        case 5:d=4;goto day; break;

                        case 6:d=0;goto day; break;

                        case 7:d=2;goto day; break;

                        case 8:d=5;goto day; break;

                        case 9:d=1;goto day; break;

                        case 10:d=3;goto day; break;

                        case 11:d=6;goto day; break;

                        case 12:d=1;goto day; break; };

};

if ((god-16)%28==0) {switch (m)

                      { case 1:d=4; goto day; break;

                        case 2:d=0;goto day; break;

                        case 3:d=1;goto day; break;

                        case 4:d=4;goto day; break;

                        case 5:d=6;goto day; break;

                        case 6:d=2;goto day; break;

                        case 7:d=4;goto day; break;

                        case 8:d=0;goto day; break;

                        case 9:d=3; goto day; break;

                        case 10:d=5;goto day; break;

                        case 11:d=1;goto day; break;

   case 12:d=3;goto day; break; };

};

if ((god-17)%28==0) {switch (m)

                      { case 1:d=6;goto day; break;

                        case 2:d=2;goto day; break;

                        case 3:d=2;goto day; break;

                        case 4:d=5;goto day; break;

                        case 5:d=0;goto day; break;

                        case 6:d=3;goto day; break;

                        case 7:d=5;goto day; break;

                        case 8:d=1;goto day; break;

                        case 9:d=4;goto day; break;

                        case 10:d=6;goto day; break;

                        case 11:d=2;goto day; break;

                        case 12:d=4;goto day; break; };

};

if ((god-18)%28==0) {switch (m)

                      { case 1:d=0;goto day; break;

                        case 2:d=3; goto day; break;

                        case 3:d=3;goto day; break;

                        case 4:d=6;goto day; break;

                        case 5:d=1;goto day; break;

                        case 6:d=4;goto day; break;

                        case 7:d=6;goto day; break;

                        case 8:d=2;goto day; break;

                        case 9:d=5;goto day; break;

                        case 10:d=0;goto day; break;

                        case 11:d=3;goto day; break;

                        case 12:d=5;goto day; break; };

};

if ((god-19)%28==0) {switch (m)

                      { case 1:d=1;goto day; break;

                        case 2:d=4;goto day; break;

                       case 3:d=4;goto day; break;

                        case 4:d=0;goto day; break;

                        case 5:d=2;goto day; break;

                        case 6:d=5;goto day; break;

                        case 7:d=0;goto day; break;

                        case 8:d=3;goto day; break;

                        case 9:d=6;goto day; break;

                        case 10:d=1;goto day; break;

                        case 11:d=4;goto day; break;

                        case 12:d=6;goto day; break; };

};

 

day:if ((d+data)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-saturday";  

if ((d+data+1)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-friday";  

if ((d+data+2)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-thursday";   

if ((d+data+3)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-wednesday";  

if ((d+data+4)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-tuesday"; 

if ((d+data+5)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-monday"; 

if ((d+data+6)%7==0) cout<<"\n\n"<<data<<"."<<m<<"."<<god<<"-sunday";  

 

if ((god>1950)&&(m==12)&&(data==31))

cout<<"\n\n"<<data<<"."<<m<<"-New Year!!!";};

if ((god>1950)&&(m==1)&&(data==1)) {cout<<"\n\n"<<data<<"."<<m<<"-New Year!!!";};

if ((god>1950)&&(m==1)&&(data==7)) {cout<<"\n\n"<<data<<"."<<m<<"-Christmass";};

if ((god>1950)&&(m==1)&&(data==14)) {cout<<"\n\n"<<data<<"."<<m<<"-Old New Year!!!";};

if ((god>1950)&&(m==2)&&(data==14)) {cout<<"\n\n"<<data<<"."<<m<<"-St. Valentine Day";};

if ((god>1950)&&(m==3)&&(data==8)) {cout<<"\n\n"<<data<<"."<<m<<"-Woman_s Day!";};

if ((god>1950)&&(m==4)&&(data==1)) {cout<<"\n\n"<<data<<"."<<m<<"-All Fool_s Day";};

if ((god>1991)&&(m==8)&&(data==24)) {cout<<"\n\n"<<data<<"."<<m<<"-Independense Day";};

if ((god>1950)&&((m==11)&&(data==17))||((m==12)&&(data==25))) {cout<<"\n\n"<<data<<"."<<m<<"-Student_s Day!!! HAPPY HOLYDAY TO US :)";};

if ((god>1969)&&(m==10)&&(data==2)) {cout<<"\n\n"<<data<<"."<<m<<" Harkiv National University of Radioelectronic Day!!!";};

if ((god>1992)&&(m==4)&&(data==17)) {int y=god-1992; cout<<"\n"<<data<<"."<<m<<" HAPPY BIRTHDAY TO ME! Today I am "<<y<<")))";};

 

 

int z;

vvod_z:{

cout<<"\n\n\nDo you want to know your zodiac about this data?";

cout<<"\nEnter 1-yes, 0-no\n\n";

cout<<"answer ";

cin>>z;};

 

if ((z<0)||(z>1)) {cout<<"\n\nERROR! Enter right answer? please!"; goto vvod_z;};

 

if (z==1) {

if ((((data>=22)&&(data<=31))&&(m==12))||(((data>=1)&&(data<=20))&&(m==1))) cout<<"\nCapricorn";

if ((((data>=21)&&(data<=30))&&(m==1))||(((data>=1)&&(data<=19))&&(m==2))) cout<<"\nAquarius";

if ((((data>=20)&&(data<=28))&&(m==2))||(((data>=1)&&(data<=20))&&(m==3))) cout<<"\nFish";

if ((((data>=21)&&(data<=31))&&(m==3))||(((data>=1)&&(data<=20))&&(m==4))) cout<<"\nAries";

if ((((data>=21)&&(data<=30))&&(m==4))||(((data>=1)&&(data<=21))&&(m==5))) cout<<"\nTelec";

if ((((data>=22)&&(data<=31))&&(m==5))||(((data>=1)&&(data<=21))&&(m==6))) cout<<"\nGemini";

if ((((data>=22)&&(data<=30))&&(m==6))||(((data>=1)&&(data<=22))&&(m==7))) cout<<"\nPAK";

if ((((data>=23)&&(data<=31))&&(m==7))||(((data>=1)&&(data<=23))&&(m==8))) cout<<"\nLion";

if ((((data>=24)&&(data<=31))&&(m==8))||(((data>=1)&&(data<=23))&&(m==9))) cout<<"\nVirgo";

Информация о работе Построение вечного календаря