Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gürcan Güleç
/
iag0581
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
339b27f6
authored
Oct 20, 2016
by
Gürcan Güleç
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifying calendar.c so it looks better
parent
ca1bf663
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
7 deletions
labs/lab4/calendar.c
labs/lab4/calendar.c
View file @
339b27f6
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
int
main
()
int
main
()
{
{
int
date
;
int
date
;
int
leap
=
0
;
int
leap
=
0
;
int
m1
[
7
]
=
{
1
,
3
,
5
,
7
,
8
,
10
,
12
};
int
m1
[
7
]
=
{
1
,
3
,
5
,
7
,
8
,
10
,
12
};
...
@@ -58,10 +57,8 @@ int main()
...
@@ -58,10 +57,8 @@ int main()
return
0
;
return
0
;
}
}
}
}
}
}
// deciding leap years
// deciding leap years
if
(
year
%
100
==
0
)
if
(
year
%
100
==
0
)
{
{
...
@@ -90,7 +87,6 @@ int main()
...
@@ -90,7 +87,6 @@ int main()
// checking february
// checking february
if
(
month
==
2
)
if
(
month
==
2
)
{
{
if
(
leap
==
1
)
if
(
leap
==
1
)
{
{
if
(
day
!=
29
)
if
(
day
!=
29
)
...
@@ -106,12 +102,10 @@ int main()
...
@@ -106,12 +102,10 @@ int main()
printf
(
"Date not valid
\n
"
);
printf
(
"Date not valid
\n
"
);
return
0
;
return
0
;
}
}
}
}
}
}
printf
(
"Date is valid
\n
"
);
printf
(
"Date is valid
\n
"
);
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment