[go: up one dir, main page]

0% found this document useful (0 votes)
1K views4 pages

Project Calender Making Using C Programming: Intoduction

This project aims to develop a calendar using C programming for daily use. The objective is to learn and implement a real-time application that shows the month, date, and day of any inputted year. Variables and strings are used to code a system that prints out a calendar without using external file storage. The code is run successfully, displaying the dates and days for each month of the given year.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views4 pages

Project Calender Making Using C Programming: Intoduction

This project aims to develop a calendar using C programming for daily use. The objective is to learn and implement a real-time application that shows the month, date, and day of any inputted year. Variables and strings are used to code a system that prints out a calendar without using external file storage. The code is run successfully, displaying the dates and days for each month of the given year.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

PROJECT CALENDER MAKING USING C PROGRAMMING

INTODUCTION:

This project was centered on developing a CALENDER for daily using. It would help to observe
date, day and month. We usually use calander as a reminder of special date, day, events,
meetings and exploring old moments. Which is very important In our day to day life.
OBJECTIVE:
The main objective of this project is to learn and implement a real time application. The project
concentrates on month, date and day of any year. It will show a whole calander of a choosen
particular year.
MOTIVATION:
In present world, everybody is very busy and sometimes forgot about what date or which day is
today. Sometime we miss a very important event or program due to not remembering which day
and date is going on. So, to get rid of these kind of mess we need a calander.
METHODOLOGY:
1. C language is used to develop this system.
2. Various variables and strings have been used for development.
3. The system does not use or create any external files to store data permanently.
The code:

#include <stdio.h>
#include <stdlib.h>

int get_1st_weekday(int year){

int d;
d = (((year - 1) * 365) + ((year - 1) / 4) - ((year - 1) / 100) + ((year) / 400) + 1) % 7;
return d;
}

int main()
{
int year,month,day,daysInMonth,weekDay=0,startingDay;
printf("\nEnter year:");
scanf("%d",&year);
char
*months[]={"January","February","March","April","May","June","July","August","September","
October","November","December"};
int monthDay[]={31,28,31,30,31,30,31,31,30,31,30,31};
if((year%4==0&&year%100!=0)||year%400==0)
monthDay[1]=29;
startingDay=get_1st_weekday(year);
for(month=0;month<12;month++){
daysInMonth=monthDay[month];
printf("\n\n%s\n",months[month]);
printf("\n SUN MON TUE WED THU FRI SAT\n");
for(weekDay=0;weekDay<startingDay;weekDay++)
printf(" ");
for(day=1;day<=daysInMonth;day++){
printf("%5d",day);
if(++weekDay>6){
printf("\n");
weekDay=0;
}
startingDay=weekDay;
}
}
}
RESULT:
The system done using C language was successfully run and required features also successfully
worked. By this system, we can see the date, day and month of any year. The outputs are shown
below:

You might also like