Calender Term Paper
Calender Term Paper
COMPUTING I
CSE 151
Research on
CALENDER
CALENDAR
8th November,2010.
ACKNOWLEDGEMENT
In this term paper i would like to thank my mam Ms Isha Batra who has given
me this opportunity of making this term paper. This topic was too interesting as
it is related to our day to day life and it was fun doing it. Thanks mam once again
as it will prove helpful in enhancing my knowledge regarding this subject.
I also want to thank my seniors who have provided there full support in
completing this term paper.
ABSTRACT
Here in this page i will be giving an overview of this term paper. I will be explaining all the
loops used, datatypes used and the operators used. it includes various loops such as for
loop and functions such as printf , scanf, void main ,getch ,etc.
All these things will be discussed in detail here in this term paper with examples.
TABLE OF CONTENTS
1) INTRODUCTION
2) EXPLANATION
3) FLOW CHARTS
4) APPLICATION
5) CONCLUSION
6) REFERENCES
INTRODUCTION
In this program of calendar we will be using the following things to run our program
1) DATATYPES
It includes the characters , float and integers, void used.
2) OPERATERS
This program will use all the operaters till now studied in c.
FOR EXAMPLE:
some of the operators in c are:
ARITHMATICAL OPERATOR : + , - , * , / , %.
LOGICAL OPERATOR : && , II, ! .
RELATIONAL OPERATOR : <, > ,<=,>=,==,!= .
ASSIGNMENT OPERATOR : += ,-=, /= ,*= , %=.
3) CONTROL STATEMENTS
Datatypes
Operators
<= for months relational operator)
= Assignment operator for checking whether the year is leap year or not?
Leap year?28:29 (ternary operator)
Increment operator for days
d=1; d<=1;d++
modulus operator for printing no. Of days in month.(arithmetical operator)
Control statements
Branching (DECISION MAKING)
These statements include switch case which further includes multiple cases of the program.
For example in calendar case one will include jan , case 2 will include feb, and so on.
Which will contain 31, 30 , 28 days.
switch( M )
so,we will be using switch case to print the months of year ie jan, feb ,mar ,april, may ,jun ,july, aug, sept
,nov, dec.
4) JULY
5) AUGUST
6) OCTOBER
7) DECEMBER
MONTHS OF 28 DAYS
1) FEBRUARY
Looping
1) In looping we use the for loops to print the max no. of months in a year.
For example:
for ( M = M_MIN; M <= M_MAX; M++ )
2) The next loop is for printing the days of a particular week that contains
seven days in a week ie sun,mon,tues,wed,thrus,fri,sat.
3) For example:
Jumping
Break statements are used so that the loop working may stop and come out of
the loop go back to the main again.
The example of this jumping is shown in the switch case used above.
Flow charts
start
Read year
Year%4
29 days 28 days
stop
Flow chart for months
start
Read months
Choice case
stop
Flow chart for days
start
Read days
Choice days
sunday
monday
tuesday
wednesday
thrusday
friday
saturday
stop
Applications
This whole material is used in making different types of calendar which
includes calendar of leap year and many different calendars which we
come across daily.
Conclusion
So i conclude with this topic of term paper as it can it can make many
calendars which will include leap year, no of months of a year which
will have 30,31 and 28 days(February).
References
1) www.answers.com
2) www.Scribd.com
3) www.google.com
4) www.askme.com