0% found this document useful (0 votes)
43 views12 pages

Calender Term Paper

This document is a term paper on calendars in C programming. It discusses the key concepts needed to create a calendar program, including data types, operators, and control structures. The term paper explains how to use switch cases to print months, for loops to iterate through days and months, and break statements to exit loops. Flowcharts are provided to illustrate the program logic and flow for determining leap years, printing months and their days, and iterating through the days of the week. The calendar program demonstrates applications of concepts learned in the computing course.

Uploaded by

224surbhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views12 pages

Calender Term Paper

This document is a term paper on calendars in C programming. It discusses the key concepts needed to create a calendar program, including data types, operators, and control structures. The term paper explains how to use switch cases to print months, for loops to iterate through days and months, and break statements to exit loops. Flowcharts are provided to illustrate the program logic and flow for determining leap years, printing months and their days, and iterating through the days of the week. The calendar program demonstrates applications of concepts learned in the computing course.

Uploaded by

224surbhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

TERM PAPER

COMPUTING I
CSE 151

Research on
CALENDER

CALENDAR
8th November,2010.

Submitted to: - Submitted by :-Surbhi Gupta

Ms Isha batra ROLL NO:RA1004A10

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

These statements include


 Branching : if , if else, if else if, switch.
 Looping : for, while, do while.
 Jumping: goto,break,continue.
EXPLANATION

Datatypes

1) We will be entering day of January first on which it starts


2) No of days in a particular month
3) Date of that month
4) Year, whether the year is leap year or not.

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 )

case JAN: printf("\n\n\n January \n");


NDPM = 31;
break;

case FEB: printf("\n\n\n February \n");


NDPM = LY? 28: 29;
break;

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.

MONTHS WITH 31 DAYS


1) JANUARY
2) MARCH
3) MAY

4) JULY
5) AUGUST
6) OCTOBER
7) DECEMBER

MONTHS WITH 30 DAYS


1) APRIL
2) JUNE
3) SEPTEMBER
4) NOVEMBER

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:

for ( D = 1; D <= 1 + J1SD * 5; D++ )


printf( " ");

for ( D = 1; D <= NDPM; D++ )

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

Write leap year No leap year

29 days 28 days

stop
Flow chart for months

start

Read months

Choice case

31 days 30 days 28 days

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).

Also no of weeks and days of a week.

References
1) www.answers.com
2) www.Scribd.com
3) www.google.com
4) www.askme.com

You might also like