SlideShare a Scribd company logo
Course Project Presentation
Presented byPresented by Course InformationCourse Information
IKHTIAR KHAN SOHAN
ID: 151-15-8638
Section: L
Course Code: CSE123
Course Title: Programming
& Problem solving
Date of Submission: 09-08-2017
Calendar viewCalendar view
Course Project Presentation
INTRODUCTION
My project show you calendar of a year. This
calendar help to known as holyday of the month
and show historical days and other problem
help to people by this calendar.
2
Course Project Presentation
MOTIVATION
• This program is very useful for us cause
people can known about their important date.
• People know about historical day and holyday.
3
Course Project Presentation
Implementation Requirements
• This Application size is 31KB and the size of
code is 3KB. So, such amount of memory is
required from hard disk.
• RAM: Minimum 256MB.
• Mouse, Keyboard.
4
Course Project Presentation
Software Requirements
• Code Blocks
• Windows XP210
5
Course Project Presentation
Algorithms
• No Algorithm used.
6
Course Project Presentation
Demonstration
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int width = 80, year;//= 2017;
int cols, lead, gap;
const char *wdays[] = { "Su", "Mo", "Tu", "We", "Th",
"Fr", "Sa" };
struct months {
const char *name;
int days, start_wday, at;
} months[12] = {
{ "January", 31, 0, 0 },
{ "February", 28, 0, 0 },
{ "March", 31, 0, 0 },
{ "April", 30, 0, 0 },
{ "May", 31, 0, 0 },
{ "June", 30, 0, 0 },
{ "July", 31, 0, 0 },
{ "August", 31, 0, 0 },
{ "September", 30, 0, 0 },
{ "October", 31, 0, 0 },
{ "November", 30, 0, 0 },
{ "December", 31, 0, 0 }
};
7
void space(int n) { while (n-- > 0) putchar(' '); }
void init_months()
{
int i;
if ((!(year % 4) && (year % 100)) || !(year % 400))
months[1].days = 29;
year--;
months[0].start_wday
= (year * 365 + year/4 - year/100 + year/400 + 1) % 7;
for (i = 1; i < 12; i++)
months[i].start_wday =
(months[i-1].start_wday + months[i-1].days) % 7;
cols = (width + 2) / 22;
while (12 % cols) cols--;
gap = cols - 1 ? (width - 20 * cols) / (cols - 1) : 0;
if (gap > 4) gap = 4;
lead = (width - (20 + gap) * cols + gap + 1) / 2;
year++;
}
void print_row(int row)
{
int c, i, from = row * cols, to = from + cols;
Course Project Presentation
space(lead);
for (c = from; c < to; c++) {
i = strlen(months[c].name);
space((20 - i)/2);
printf("%s", months[c].name);
space(20 - i - (20 - i)/2 + ((c == to - 1) ? 0 : gap));
}
putchar('n');
space(lead);
for (c = from; c < to; c++) {
for (i = 0; i < 7; i++)
printf("%s%s", wdays[i], i == 6 ? "" : " ");
if (c < to - 1) space(gap);
else putchar('n');
}
while (1) {
for (c = from; c < to; c++)
if (months[c].at < months[c].days) break;
if (c == to) break;
space(lead);
for (c = from; c < to; c++) {
for (i = 0; i < months[c].start_wday; i++) space(3);
while(i++ < 7 && months[c].at < months[c].days) {
printf("%2d", ++months[c].at);
if (i < 7 || c < to - 1) putchar(' ');
}
8
if (i < 7 || c < to - 1) putchar(' ');
}
while (i++ <= 7 && c < to - 1) space(3);
if (c < to - 1) space(gap - 1);
months[c].start_wday = 0;
}
putchar('n');
}
putchar('n');
}
void print_year()
{
int row;
char buf[32];
sprintf("%dn",year);
space((width - strlen(buf)) / 2);
printf("%cnn",buf);
for (row = 0; row * cols < 12; row++)
print_row(row);
}
Course Project Presentation
int main(int c, char **v)
{
int i, year_set=0 ,hi;
scanf("%d",&hi);
hi=year;
for (i = 1; i < c; i++) {
if (!strcmp(v[i], "-w")) {
if (++i == c || (width = atoi(v[i])) < 20)
goto bail;
} else if (!year_set) {
if (!sscanf(v[i], "%d", &year) || year <= 0)
year=hi;
year_set = 1;
} else
goto bail;
}
init_months();
print_year();
return 0;
bail: fprintf(stderr, "bad argsnUsage: %s year [-w width (>= 20)]n", v[0]);
exit(1);
}
9
Course Project Presentation
Input
10
Course Project Presentation
Output
11
Course Project Presentation
Future Prospective
• It’s improvement possible.
12
Course Project Presentation
References
• Programming hub.
• Stack overflow.
• Google.
13
Course Project Presentation
Conclusion
We use calendar in our everyday life. This
calendar helps us known as holyday, historical
day and important work by this we prepared for
our some days ago.
14
Course Project Presentation
THANK YOU
15

More Related Content

PPTX
presentation of make a calendar in c language.
PDF
Programming for Problem Solving
DOCX
C interview question answer 2
PDF
Arrays and function basic c programming notes
PDF
Data structures chapter 1
PDF
C programming for problem solving
PPTX
Simple Calendar Application using C
PPTX
What is identifier c programming
presentation of make a calendar in c language.
Programming for Problem Solving
C interview question answer 2
Arrays and function basic c programming notes
Data structures chapter 1
C programming for problem solving
Simple Calendar Application using C
What is identifier c programming

What's hot (20)

PDF
Python - gui programming (tkinter)
PPTX
Introduction to Android and Android Studio
DOC
DBMS Practical File
PPT
Introduction to JavaScript
PDF
OOP Assignment 03.pdf
PPTX
Library Management System ppt
PPTX
SQL - Structured query language introduction
PPTX
Sequence diagram
PPT
Visual Basic menu
PPT
Javascript
PPT
JavaScript Control Statements I
PPTX
grocery management system
DOC
BLOOD DONATION SYSTEM IN C++
DOC
Dbms lab Manual
DOCX
Oops practical file
PPTX
Basics of Object Oriented Programming in Python
PDF
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
PPTX
Object Oriented Design
PPT
Asp.net.
PPTX
Project on PHP for Complaint management system
Python - gui programming (tkinter)
Introduction to Android and Android Studio
DBMS Practical File
Introduction to JavaScript
OOP Assignment 03.pdf
Library Management System ppt
SQL - Structured query language introduction
Sequence diagram
Visual Basic menu
Javascript
JavaScript Control Statements I
grocery management system
BLOOD DONATION SYSTEM IN C++
Dbms lab Manual
Oops practical file
Basics of Object Oriented Programming in Python
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Object Oriented Design
Asp.net.
Project on PHP for Complaint management system
Ad

Similar to Project presentation(View calender) (20)

PDF
DSC Lab Manual fffffffffffffffffffff.pdf
PDF
Lo17
PDF
PDF
P2
PDF
Problem DefinitionBuild a Date class and a main function to test i.pdf
PDF
C programming & data structure [arrays & pointers]
DOC
Project report (anurag)
PDF
13 -times_and_dates
PDF
C- Programming Assignment practice set 2 solutions
PDF
Amcat automata questions
PDF
Amcat automata questions
PDF
Write a program to generate the entire calendar for one year. The pr.pdf
PDF
Modify the Date class that was covered in the lecture which overload.pdf
PDF
Need to make a Java program which calculates the number of days betw.pdf
DOCX
#include Status.hnamespace sdds{StatusStatus(c
DOCX
#include Status.hnamespace sdds{StatusStatus(c
PPTX
DSA ppt.pptx
PDF
PPTX
01 computer programming
DSC Lab Manual fffffffffffffffffffff.pdf
Lo17
P2
Problem DefinitionBuild a Date class and a main function to test i.pdf
C programming & data structure [arrays & pointers]
Project report (anurag)
13 -times_and_dates
C- Programming Assignment practice set 2 solutions
Amcat automata questions
Amcat automata questions
Write a program to generate the entire calendar for one year. The pr.pdf
Modify the Date class that was covered in the lecture which overload.pdf
Need to make a Java program which calculates the number of days betw.pdf
#include Status.hnamespace sdds{StatusStatus(c
#include Status.hnamespace sdds{StatusStatus(c
DSA ppt.pptx
01 computer programming
Ad

More from Ikhtiar Khan Sohan (19)

PPTX
About Robotics
PPTX
Copy propagation
PPTX
GDP of Bangladesh
PPTX
Modern Network Security Issue and Challenge
PPTX
About Google(Presentation)
PPTX
Students Database Management System
PPTX
Presentation About Sophia the robot
PPTX
Discrete Math Presentation(Rules of Inference)
PPTX
Presentation(Cyber crime & security)
PPTX
Presentation(Drones)
PPTX
Presentation(About Google)
PPTX
Project proposal presentation(Quiz game)
PPT
Project proposal presentation(blood bank management system)
PPTX
Project proposal presentation(tic tac-toe-game)
PPTX
Project proposal presentation(bkash)
DOCX
Assignment of Robotics
DOCX
CV Writting
PDF
Assignment of Movie Review(Avatar)
PDF
Assignment of Movie Review(PK)
About Robotics
Copy propagation
GDP of Bangladesh
Modern Network Security Issue and Challenge
About Google(Presentation)
Students Database Management System
Presentation About Sophia the robot
Discrete Math Presentation(Rules of Inference)
Presentation(Cyber crime & security)
Presentation(Drones)
Presentation(About Google)
Project proposal presentation(Quiz game)
Project proposal presentation(blood bank management system)
Project proposal presentation(tic tac-toe-game)
Project proposal presentation(bkash)
Assignment of Robotics
CV Writting
Assignment of Movie Review(Avatar)
Assignment of Movie Review(PK)

Recently uploaded (20)

PPTX
History, Philosophy and sociology of education (1).pptx
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
Complications of Minimal Access Surgery at WLH
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Introduction to Building Materials
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Lesson notes of climatology university.
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Computing-Curriculum for Schools in Ghana
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
advance database management system book.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Cell Types and Its function , kingdom of life
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Classroom Observation Tools for Teachers
PDF
Weekly quiz Compilation Jan -July 25.pdf
History, Philosophy and sociology of education (1).pptx
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Complications of Minimal Access Surgery at WLH
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Introduction to Building Materials
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Unit 4 Skeletal System.ppt.pptxopresentatiom
Lesson notes of climatology university.
Hazard Identification & Risk Assessment .pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Computing-Curriculum for Schools in Ghana
Practical Manual AGRO-233 Principles and Practices of Natural Farming
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Chinmaya Tiranga quiz Grand Finale.pdf
advance database management system book.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Cell Types and Its function , kingdom of life
Paper A Mock Exam 9_ Attempt review.pdf.
Classroom Observation Tools for Teachers
Weekly quiz Compilation Jan -July 25.pdf

Project presentation(View calender)

  • 1. Course Project Presentation Presented byPresented by Course InformationCourse Information IKHTIAR KHAN SOHAN ID: 151-15-8638 Section: L Course Code: CSE123 Course Title: Programming & Problem solving Date of Submission: 09-08-2017 Calendar viewCalendar view
  • 2. Course Project Presentation INTRODUCTION My project show you calendar of a year. This calendar help to known as holyday of the month and show historical days and other problem help to people by this calendar. 2
  • 3. Course Project Presentation MOTIVATION • This program is very useful for us cause people can known about their important date. • People know about historical day and holyday. 3
  • 4. Course Project Presentation Implementation Requirements • This Application size is 31KB and the size of code is 3KB. So, such amount of memory is required from hard disk. • RAM: Minimum 256MB. • Mouse, Keyboard. 4
  • 5. Course Project Presentation Software Requirements • Code Blocks • Windows XP210 5
  • 7. Course Project Presentation Demonstration #include <stdio.h> #include <stdlib.h> #include <string.h> int width = 80, year;//= 2017; int cols, lead, gap; const char *wdays[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" }; struct months { const char *name; int days, start_wday, at; } months[12] = { { "January", 31, 0, 0 }, { "February", 28, 0, 0 }, { "March", 31, 0, 0 }, { "April", 30, 0, 0 }, { "May", 31, 0, 0 }, { "June", 30, 0, 0 }, { "July", 31, 0, 0 }, { "August", 31, 0, 0 }, { "September", 30, 0, 0 }, { "October", 31, 0, 0 }, { "November", 30, 0, 0 }, { "December", 31, 0, 0 } }; 7 void space(int n) { while (n-- > 0) putchar(' '); } void init_months() { int i; if ((!(year % 4) && (year % 100)) || !(year % 400)) months[1].days = 29; year--; months[0].start_wday = (year * 365 + year/4 - year/100 + year/400 + 1) % 7; for (i = 1; i < 12; i++) months[i].start_wday = (months[i-1].start_wday + months[i-1].days) % 7; cols = (width + 2) / 22; while (12 % cols) cols--; gap = cols - 1 ? (width - 20 * cols) / (cols - 1) : 0; if (gap > 4) gap = 4; lead = (width - (20 + gap) * cols + gap + 1) / 2; year++; } void print_row(int row) { int c, i, from = row * cols, to = from + cols;
  • 8. Course Project Presentation space(lead); for (c = from; c < to; c++) { i = strlen(months[c].name); space((20 - i)/2); printf("%s", months[c].name); space(20 - i - (20 - i)/2 + ((c == to - 1) ? 0 : gap)); } putchar('n'); space(lead); for (c = from; c < to; c++) { for (i = 0; i < 7; i++) printf("%s%s", wdays[i], i == 6 ? "" : " "); if (c < to - 1) space(gap); else putchar('n'); } while (1) { for (c = from; c < to; c++) if (months[c].at < months[c].days) break; if (c == to) break; space(lead); for (c = from; c < to; c++) { for (i = 0; i < months[c].start_wday; i++) space(3); while(i++ < 7 && months[c].at < months[c].days) { printf("%2d", ++months[c].at); if (i < 7 || c < to - 1) putchar(' '); } 8 if (i < 7 || c < to - 1) putchar(' '); } while (i++ <= 7 && c < to - 1) space(3); if (c < to - 1) space(gap - 1); months[c].start_wday = 0; } putchar('n'); } putchar('n'); } void print_year() { int row; char buf[32]; sprintf("%dn",year); space((width - strlen(buf)) / 2); printf("%cnn",buf); for (row = 0; row * cols < 12; row++) print_row(row); }
  • 9. Course Project Presentation int main(int c, char **v) { int i, year_set=0 ,hi; scanf("%d",&hi); hi=year; for (i = 1; i < c; i++) { if (!strcmp(v[i], "-w")) { if (++i == c || (width = atoi(v[i])) < 20) goto bail; } else if (!year_set) { if (!sscanf(v[i], "%d", &year) || year <= 0) year=hi; year_set = 1; } else goto bail; } init_months(); print_year(); return 0; bail: fprintf(stderr, "bad argsnUsage: %s year [-w width (>= 20)]n", v[0]); exit(1); } 9
  • 12. Course Project Presentation Future Prospective • It’s improvement possible. 12
  • 13. Course Project Presentation References • Programming hub. • Stack overflow. • Google. 13
  • 14. Course Project Presentation Conclusion We use calendar in our everyday life. This calendar helps us known as holyday, historical day and important work by this we prepared for our some days ago. 14