HEALTH RELATED TOPICS HEALTHY HABITS HOROSCOPE EARN AT HOME LOVE GAMES DOWNLOADS C++ TUTORIALS CONTACT | /* ********************************************* PASTE THIS CODE IN YOUR TURBOC (Any problem in project contact me) /* ********************************************* Project: To find the Day of any date entered by the user. Project developed by Computer Education Center-Paschim vihar,New Delhi ***************************************************************************/ / #### MAIN HEADER FILES INCLUDED #########*/ #include iostream.h //for input and output stream regulation #include conio.h //for getch(),clrscr() #include stdio.h //for C library functions #include ctype.h //for checking uppercase or lowercase #include string.h //for string compare, string concatatination #include graphics.h //for graphics features #include dos.h //for delay and sound commands #include stdlib.h //for exit (0) function void welcome_screen(); void start(); void updown();void menu(); /************/ void menu() {int l,t,r,b,p; initgraph(&gdriver, &gmode, ""); //left,top,right,bottom l=10; t=460; r=600; b=10; rectangle(l,t,r,b); /*********************/ void welcome_screen() { clrscr(); gotoxy(23,7); cout<<"********* W E L C O M E ********* " ; cout<<" C O M P U T E R E D U C A T I O N C E N T R E " ; cout<<" S O F T W A R E TO K N O W D A Y OF D A T E "; for(int x=50;x>=22;x--) { nosound(); gotoxy(20,14); cout<<"D O N E B Y "; gotoxy(x,16); cputs(" Computer Education Centre "); gotoxy(x,20); cout<<" XII - A "; } gotoxy(17,25); cout<<"******** PRESS ANY KEY TO CONTINUE ********* "; ; } /**********************/ void updown() {int i;menu();gotoxy(15,15);cout<<"Special Thanks To"; gotoxy(15,17);cout<<"Computer Education Centre";delay(2000); int d=DETECT,m;initgraph(&d,&m," "); settextstyle(7,0,7);randomize(); for(i=0;i<5800;i++)putpixel(random(800),random(600),random(15)+1); i="1;i<=" cnt="0; printf(" c="getch())" p="strcmp(orgpass,password); if(p=" i="=" d="DETECT,m,i;initgraph(&d,&m," i="0; i<5800;i++)putpixel(random(800),random(600),random(15)+1); gotoxy(25,7);cout<<">>year; cout<<"ENTER THE MONTH ( e.g. 7 FOR JULY) : "; cin>>month; cout<<"ENTER THE DAY (1-31, 1-30, 1-29/28 depending on the month) : "; cin>>date; m=7;// 1 jan 2000 was a saturday if(year<2000) yeard="2000-year;" r=""> " r="r+yeard;" r="r%7;">2000) { yeard=year-2000 ; if (yeard%4==0) r=(yeard/4)+1; else r=(yeard/4)+1 ; // calculation of number of leap years in between & 2000 was a leap year r=r+yeard ; r=r%7 ; m+=r ; m=m%7 ; } r=year%100; r%=4; // if r==0 then it is a leap year; if((r==0)&&(year>2000))m--; switch(month) { case 12: m+=(30%7);// nov has 30 days. case 11: m+=(31%7);// oct has 31 days. case 10: m+=(30%7);// sep has 30 days. case 9 : m+=(31%7);// aug has 31 days. case 8 : m+=(31%7);// july has 31 days. case 7 : m+=(30%7);// june has 30 days. case 6 : m+=(31%7);// may has 31 days. case 5 : m+=(30%7);// apr has 30 days. case 4 : m+=(31%7);// march has 31 days. case 3: { if(r==0) m+=(29%7); // in a leap year feb has one extra day. else m+=(28%7); } case 2: m+=(31%7); // jan has 31 days. } cout<<"date' updown(); }
|
---|