Add to Favorites    Make Home Page 2020 Online  
 Language Categories  
 Our Services  

Home » C Home » Beginners / Lab Assignments Home » Calander

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title Calander
Author Danish Aariz
Author Email jazz_danish2000 [at] rediffmail.com
Description U can find the date or the week of the year u wantto know
about.
Category C » Beginners / Lab Assignments
Hits 386080
Code Select and Copy the Code
// CALANDER FOR YEARS... // DESIGNED BY Arsalan Danish. # include<stdio.h> # include<conio.h> # include<math.h> # include<dos.h> # include<stdlib.h> void print_days() { textcolor(10); gotoxy(10,6); cprintf("SUN MON TUE WED TUR FRI SAT"); gotoxy(42,6); cprintf("SUN MON TUE WED TUR FRI SAT"); gotoxy(10,16); cprintf("SUN MON TUE WED TUR FRI SAT"); gotoxy(42,16); cprintf("SUN MON TUE WED TUR FRI SAT"); } void main() { clrscr(); int year=0,x=0,s=3,i=0,q,j,k,t,p=0,r=1; int month[12],temp=0; long y=0; char ch,ch1; textcolor(14); month[0]=31;month[1]=28;month[2]=31;month[3]=30;month[4]=31;month[5]=30; month[6]=31;month[7]=31;month[8]=30;month[9]=31;month[10]=30;month[11]=31; do { clrscr(); textcolor(11); cprintf(" ENTER THE YEAR "); scanf("%d",&year); temp=0;x=0;s=3;i=0;q=0;j=0;k=0;t=0;p=0;r=1;y=0; if(year>x) { while(year>x) { if(x%4==0) { if(x%100!=0) y=y+366; else { if(x%400==0) y=y+366; else y=y+365; } } else y=y+365; x++; if(x==year) { if(x%4==0) { if(x%100!=0) temp=1; else { if(x%400==0) temp=1; else temp=0; } } else temp=0; } } } else if(year<x) { clrscr(); textcolor(15); sound(1000); delay(100); cprintf(" HEI '0' IS THE MIN VALUE & '32767' IS THE MAX VALUE "); nosound(); getch(); continue; } if(year==0||temp==1) month[1]=29; else month[1]=28; if(year>0) s=(y+6)%7; i=0; q=10; k=7; while(i<=11) { if(i==0) { clrscr(); textcolor(10); cprintf(" CALANDER FOR THE YEAR %d",year); p=0; while(p<13) { gotoxy(38+p,2); cprintf("-"); gotoxy(38-p,2); textcolor(14); cprintf("-"); delay(100); p++; } print_days(); gotoxy(16,4); cprintf(" JANUARY FEBRUARY "); gotoxy(16,14); cprintf(" MARCH APRIL "); } if(i==4) { q=10; k=7; clrscr(); textcolor(10); printf(" CALANDER FOR THE YEAR %d ",year); textcolor(14); cprintf(" -------------------------"); print_days(); gotoxy(16,4); textcolor(10); cprintf(" MAY JUNE "); gotoxy(16,14); textcolor(10); cprintf(" JULY AUGEST "); } if(i==8) { q=10; k=7; clrscr(); textcolor(10); printf(" CALANDER FOR THE YEAR %d ",year); textcolor(14); cprintf(" -------------------------"); print_days(); gotoxy(16,4); cprintf(" SEPTEMBER OCTOBER "); gotoxy(16,14); cprintf(" NAVOMBER DECEMBER "); } j=1; while(j<=month[i]) { if(i==1||i==3||i==5||i==7||i==9||i==11) { q=42; if(j==1) { if(k==12||k==22) k=k-5; if(k==11||k==21) k=k-4; } } else q=10; if(i==2||i==3||i==6||i==7||i==10||i==11) { if(j==1) k=17; } t=q+s*4; if(s==0||((k==8||k==18)&&s==6)) { gotoxy(t,k); textcolor(LIGHTRED); cprintf("%d",j); } else { gotoxy(t,k); textcolor(14); cprintf("%d",j); } s++; if(s==7) { s=0; k++; } j++; } if(i==3||i==7||i==11) { gotoxy(10,24); textcolor(10+128); cprintf("PRESS ANY KEY TO CONTINUE PRESS 'N' TO EXIT "); textcolor(10); flushall(); ch=getche(); if(ch=='n'||ch=='N') exit(0); } i++; } clrscr(); textcolor(11); cprintf(" WANT TO DISPLAY ANOTHER "); textcolor(14); ch1=getche(); if(ch1=='n'||ch1=='N') exit(0); else r=1; }while(r==1); getch(); }

Related Source Codes

Script Name Author
The Game Opposite as seen on Nokia 2300 Mobile Manikanta
RECURSIVE BALANCED QUICK SORT ashish
Radix Sort ashish
Change your mouse pointer Ashim
The blinking star Shashank
Data Validation Crylittlebaby
To search a file by giving file type like mp3 or mpeg or doc Prashanth SR
Menus Demonstration B.Chidhambaram
Employee Database Project Using C. Reenku Raman Nayak
Creating a Lexical Analyzer in c fahad bader al-buhairi �դ ?�� ��??���
Calendar Program Omkar & Devendra
Stop double Process for start in C Cedrik Jurak
Stop double Process for start in C Cedrik Jurak
Time Scheduler Atiq Anwar
A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=1148


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review