-
Notifications
You must be signed in to change notification settings - Fork 0
/
19.cpp
48 lines (38 loc) · 1.09 KB
/
19.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
using namespace std;
int main()
{
int yil,ay,gun,pazar=1,say,sayici2=0;
for(yil=1900;yil<2001;yil++){
for(ay=1;ay<=12;ay++){
if(ay==1 || ay==3 || ay==5 || ay==7 || ay==8 || ay==10 || ay==12)
say=31;
else if(ay==2){
if(yil%4==0){
say=29;
if(yil%100==0){
say=28;
if(yil%400==0){
say=29;
}
}
}
else
say=28;
}
else
say=30;
for(gun=1;gun<=say;gun++){
if(gun==1 && pazar==7){
sayici2++;
cout << yil<< endl;
}
if(pazar==7)
pazar=0;
pazar++;
}
}
}
cout << sayici2 <<" -2 not included(1/1/1900-1/1/1991) = " << sayici2-2 << endl; //son pazarı (31 Aralık 2000 - Pazar)çıkınca 171
return 0;
}