Commit 3fc04df2 by trkall

kuup2eva yl, t66tab ilusti

parent db6333a6
20121204 20121204
20161212 20161212
01221449 29995525
34643860
23450101
18520120
31250129
12622140
19950620
19011212 19011212
20171128 20171128
20162711 20162711
10101010 10101010
01231023
10231203 10231203
68423216
29961689 29961689
16325903
25677306
26190130
18098895
26726955
26178565
25270306
26658843
13194366
29513228
22480823
19121202 19121202
61541086 30454093
38512621 19050312
40322698 18477187
42862601 34072948
07092402 22492255
27616899
13747544
34737213
34098657
25010513
31219168
34084412
19960227
12934157
26978802
20170622
27919421
23016094
23105385
34826796
19843125
31959022
23410323
14234083
19861406
25305837
23016955
26372792 26372792
39722618 25238156
70751741
93723575
56001021
50141509
31003091 31003091
29052106 29052106
73962945 21557290
72751836 10754337
39572459 30256622
78002220 32028322
17259061
17440827
15592864
23092481 23092481
11314925
35221630 35221630
56231607 35599015
43632209 17480324
82322594
64223274
07583151
10082519
19962212
76862715
10842337 10842337
14659579
33958238
20121204 20121204
20161212 20161212
01221449 29995525
34643860
23450101
18520120
31250129
12622140
19950620
19011212 19011212
20171128 20171128
20162711 20162711
10101010 10101010
01231023
10231203 10231203
68423216
29961689 29961689
33632704
26190130
18098895
26726955
26178565
25270306
26658843
13194366
29513228
22480823
19121202 19121202
61541086 30454093
38512621 19050312
40322698 18477187
42862601 34072948
07092402 22492255
27616899
13747544
34737213
34098657
25010513
31219168
19960227
12934157
14512204
20170622
27919421
23016094
23105385
34826796
19843125
31959022
23410323
14234083
19861406
25305837
23016955
26372792 26372792
39722618 25238156
70751741
93723575
56001021
50141509
31003091 31003091
29052106 29052106
73962945 21557290
72751836 10754337
39572459 30256622
78002220 32028322
17259061
17440827
15592864
23092481 23092481
11314925
35221630 35221630
56231607 35599015
43632209 17480324
82322594
64223274
10082519
19962212 19962212
76862715 10842337
14659579
33958238
...@@ -71,15 +71,14 @@ void ChkDate(dates DateArray[], int lines) ...@@ -71,15 +71,14 @@ void ChkDate(dates DateArray[], int lines)
for(i=0;i<lines;i++) for(i=0;i<lines;i++)
{ {
chk = 0; chk = 0;
aasta=(DateArray[i].date[4]- '0')*1000 +(DateArray[i].date[5] - '0')*100 aasta=(DateArray[i].date[0]- '0')*1000 +(DateArray[i].date[1] - '0')*100
+ (DateArray[i].date[6] - '0')*10 + (DateArray[i].date[7] - '0'); + (DateArray[i].date[2] - '0')*10 + (DateArray[i].date[3] - '0');
if(aasta > 1000 && aasta <= 3600) if(aasta > 1000 && aasta <= 3600)
{ {
kuu =(DateArray[i].date[4] - '0')*10 + (DateArray[i].date[5] - '0');
kuu =(DateArray[i].date[2] - '0')*10 + (DateArray[i].date[3] - '0');
if(kuu > 0 && kuu <= 12) if(kuu > 0 && kuu <= 12)
{ {
p2ev=(DateArray[i].date[0] -'0')*10+(DateArray[i].date[1] -'0'); p2ev=(DateArray[i].date[6] -'0')*10+(DateArray[i].date[7] -'0');
if(aasta%4 == 0) if(aasta%4 == 0)
{ {
liig = 1; liig = 1;
...@@ -126,10 +125,10 @@ void ChkDate(dates DateArray[], int lines) ...@@ -126,10 +125,10 @@ void ChkDate(dates DateArray[], int lines)
} }
// end of EU, start of US // end of EU, start of US
///---------------------------------------- ///----------------------------------------
kuu =(DateArray[i].date[0] - '0')*10 + (DateArray[i].date[1] - '0'); kuu =(DateArray[i].date[6] - '0')*10 + (DateArray[i].date[7] - '0');
if(kuu > 0 && kuu <= 12) if(kuu > 0 && kuu <= 12)
{ {
p2ev=(DateArray[i].date[2] -'0')*10+(DateArray[i].date[3] -'0'); p2ev=(DateArray[i].date[4] -'0')*10+(DateArray[i].date[5] -'0');
if(aasta%4 == 0) if(aasta%4 == 0)
{ {
liig = 1; liig = 1;
...@@ -186,7 +185,7 @@ void ChkDate(dates DateArray[], int lines) ...@@ -186,7 +185,7 @@ void ChkDate(dates DateArray[], int lines)
fclose(nodate); fclose(nodate);
} }
void kokku(dates DateArray[], int lines) int kokku(dates DateArray[], int lines)
{ {
char *EUname = "EU.txt"; char *EUname = "EU.txt";
char *USname = "US.txt"; char *USname = "US.txt";
...@@ -195,10 +194,8 @@ void kokku(dates DateArray[], int lines) ...@@ -195,10 +194,8 @@ void kokku(dates DateArray[], int lines)
US = fopen(USname, "r"); US = fopen(USname, "r");
int i = 0; int i = 0;
int j = 0; int j = 0;
int k = 0; int newlines;
int x = 0; while(!feof(EU))
while(!feof(EU) && i < lines)
{ {
fscanf(EU, "%s", DateArray[i].date); fscanf(EU, "%s", DateArray[i].date);
DateArray[i].loc = 1; DateArray[i].loc = 1;
...@@ -208,37 +205,38 @@ void kokku(dates DateArray[], int lines) ...@@ -208,37 +205,38 @@ void kokku(dates DateArray[], int lines)
fclose(EU); fclose(EU);
j=i; j=i;
while(!feof(US) && j < lines) while(!feof(US))
{ {
fscanf(US, "%s", DateArray[j].date); fscanf(US, "%s", DateArray[j].date);
DateArray[j].loc = 0; DateArray[j].loc = 0;
j++; j++;
} }
newlines = j-1;
fclose(US); fclose(US);
for(j=0;j<i;j++) for(j=0;j<i;j++)
{ {
DateArray[j].uus = ((DateArray[j].date[4]-'0')*10000000 + DateArray[j].uus = ((DateArray[j].date[0]-'0')*10000000 +
(DateArray[j].date[5]-'0')*1000000 + (DateArray[j].date[1]-'0')*1000000 +
(DateArray[j].date[6]-'0')*100000 + (DateArray[j].date[2]-'0')*100000 +
(DateArray[j].date[7]-'0')*10000 + (DateArray[j].date[3]-'0')*10000 +
(DateArray[j].date[2]-'0')*1000 + (DateArray[j].date[4]-'0')*1000 +
(DateArray[j].date[3]-'0')*100 + (DateArray[j].date[5]-'0')*100 +
(DateArray[j].date[0]-'0')*10 + (DateArray[j].date[6]-'0')*10 +
(DateArray[j].date[1]-'0')); (DateArray[j].date[7]-'0'));
printf("%d\n", DateArray[j].uus);
} }
for(i=j;i<lines;i++) for(i=j;i<newlines;i++)
{ {
DateArray[i].uus = (DateArray[j].date[4]-'0')*10000000 + DateArray[i].uus = (DateArray[i].date[0]-'0')*10000000 +
(DateArray[j].date[5]-'0')*1000000 + (DateArray[i].date[1]-'0')*1000000 +
(DateArray[j].date[6]-'0')*100000 + (DateArray[i].date[2]-'0')*100000 +
(DateArray[j].date[7]-'0')*10000 + (DateArray[i].date[3]-'0')*10000 +
(DateArray[j].date[0]-'0')*1000 + (DateArray[i].date[6]-'0')*1000 +
(DateArray[j].date[1]-'0')*100 + (DateArray[i].date[7]-'0')*100 +
(DateArray[j].date[2]-'0')*10 + (DateArray[i].date[4]-'0')*10 +
(DateArray[j].date[3]-'0'); (DateArray[i].date[5]-'0');
} }
return newlines;
} }
void failikirjutamine(dates DateArray[], int lines) void failikirjutamine(dates DateArray[], int lines)
...@@ -250,7 +248,7 @@ void failikirjutamine(dates DateArray[], int lines) ...@@ -250,7 +248,7 @@ void failikirjutamine(dates DateArray[], int lines)
Kokku = fopen(koos, "w"); Kokku = fopen(koos, "w");
int i; int i;
sorteerimine(DateArray, lines); sorteerimine(DateArray, lines);
for(i=0;i<lines;i++) for(i=1;i<lines;i++)
{ {
if(DateArray[i].loc == 1) if(DateArray[i].loc == 1)
{ {
...@@ -265,7 +263,7 @@ void failikirjutamine(dates DateArray[], int lines) ...@@ -265,7 +263,7 @@ void failikirjutamine(dates DateArray[], int lines)
void sorteerimine(dates DateArray[], int lines) void sorteerimine(dates DateArray[], int lines)
{ {
int sorditud; int sorditud;
int i, j; int i;
int temp; int temp;
int kontroll; int kontroll;
do do
......
73211452 EU 35599015 EU
35757293 EU 35591590 US
32742264 EU 35223016 US
32164268 EU 35221630 EU
31515807 EU 34829667 US
30910031 EU 34826796 EU
29459673 EU 34737213 EU
27923726 EU 34731372 US
27158676 EU 34646038 US
27111620 EU 34643860 EU
26983240 EU 34098657 EU
26215138 EU 34095786 US
26187239 EU 34084412 EU
26018642 EU 34074829 US
25943282 EU 34072948 EU
25190810 EU 33958238 EU
24810923 EU 33953882 US
24595739 EU 33630427 US
24020907 EU 32028322 EU
23378410 EU 32022283 US
22200078 EU 31959022 EU
22129619 EU 31952290 US
22096343 EU 31252901 US
21060529 EU 31250129 EU
18367572 EU 31219168 EU
17417570 EU 31216891 US
16899629 EU 31009130 US
16302235 EU 31003091 EU
16072356 EU 30459340 US
15091450 EU 30454093 EU
14492201 EU 30256622 EU
12121620 EU 30252266 US
12120119 EU 29995525 EU
12042012 US 29992555 US
12042012 US 29968916 US
12042012 US 29961689 EU
12042012 US 29513228 EU
12042012 US 29512832 US
12042012 US 29052106 EU
12042012 US 29050621 US
12042012 US 27919421 EU
12042012 US 27912194 US
12042012 US 27619968 US
12042012 US 27616899 EU
12042012 US 26978802 EU
12042012 US 26726955 EU
12042012 US 26725569 US
12042012 US 26658843 EU
12042012 US 26654388 US
12042012 US 26379227 US
12042012 US 26372792 EU
12042012 US 26193001 US
12042012 US 26190130 EU
12042012 US 26178565 EU
12042012 US 26176585 US
12042012 US 25677306 EU
12042012 US 25305837 EU
12042012 US 25303758 US
12042012 US 25270603 US
12042012 US 25270306 EU
12042012 US 25238156 EU
12042012 US 25235681 US
12042012 US 25011305 US
12042012 US 25010513 EU
12042012 US 23450101 EU
12042012 US 23450101 US
12042012 US 23412303 US
12042012 US 23410323 EU
12042012 US 23108553 US
12042012 US 23105385 EU
12042012 US 23098124 US
12042012 US 23092481 EU
12042012 US 23019460 US
12042012 US 23016955 EU
12042012 US 23016094 EU
12042012 US 23015569 US
12042012 US 22495522 US
12042012 US 22492255 EU
12042012 US 22482308 US
12042012 US 22480823 EU
12042012 US 21559072 US
12042012 US 21557290 EU
12042012 US 20172811 US
12042012 US 20172206 US
12042012 US 20171128 EU
12042012 US 20170622 EU
12042012 US 20162711 EU
12042012 US 20161212 EU
12042012 US 20161212 US
12042012 US 20161127 US
12042012 US 20121204 EU
12042012 US 20120412 US
12042012 US 19962702 US
12042012 US 19961222 US
12042012 US 19960227 EU
12042012 US 19952006 US
12042012 US 19950620 EU
12042012 US 19861406 EU
12042012 US 19860614 US
12042012 US 19843125 EU
12042012 US 19842531 US
12042012 US 19121202 EU
12042012 US 19120212 US
12042012 US 19051203 US
12042012 US 19050312 EU
12042012 US 19011212 EU
12042012 US 19011212 US
12042012 US 18522001 US
12042012 US 18520120 EU
12042012 US 18478771 US
12042012 US 18477187 EU
12042012 US 18099588 US
12042012 US 18098895 EU
12042012 US 17482403 US
12042012 US 17480324 EU
12042012 US 17442708 US
12042012 US 17440827 EU
12042012 US 17259061 EU
12042012 US 17256190 US
12042012 US 16325903 EU
12042012 US 15596428 US
12042012 US 15592864 EU
12042012 US 14659579 EU
12042012 US 14657995 US
12042012 US 14510422 US
12042012 US 14238340 US
12042012 US 14234083 EU
12042012 US 13747544 EU
12042012 US 13744475 US
12042012 US 13196643 US
12042012 US 13194366 EU
12042012 US 12935741 US
12042012 US 12934157 EU
12042012 US 12624021 US
12042012 US 12622140 EU
12042012 US 11314925 EU
12042012 US 11312549 US
12042012 US 10843723 US
12042012 US 10842337 EU
12042012 US 10754337 EU
12042012 US 10753743 US
12042012 US 10231203 EU
12042012 US 10230312 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12042012 US
12041220 EU
12032310 EU
12021219 EU
11281720 EU
10865461 EU
10232301 EU
10210056 EU
10101010 EU 10101010 EU
10101010 US
...@@ -19,13 +19,13 @@ int main() ...@@ -19,13 +19,13 @@ int main()
return -1; return -1;
} }
lines = FileLenght(sisse); lines = FileLenght(sisse);
dates DateArray[lines]; dates DateArray[2*lines];
//dates *DateArray = (dates*)malloc(sizeof(dates*)); //dates *DateArray = (dates*)malloc(sizeof(dates*));
FileSisse(DateArray, sisse); FileSisse(DateArray, sisse);
fclose(sisse); fclose(sisse);
ChangeFormat(DateArray, lines); ChangeFormat(DateArray, lines);
ChkDate(DateArray, lines); ChkDate(DateArray, lines);
kokku(DateArray, lines); lines = kokku(DateArray, lines);
failikirjutamine(DateArray, lines); failikirjutamine(DateArray, lines);
return 0; return 0;
} }
......
No preview for this file type
No preview for this file type
29995525
66344125 66344125
34643860 01221449
95011203 95011203
23450101
95360412 95360412
18520120
92520125 92520125
59200523 59200523
50250293 50250293
31250129
98232035 98232035
92352358 92352358
43250396 43250396
...@@ -16,14 +12,13 @@ ...@@ -16,14 +12,13 @@
51510231 51510231
41260707 41260707
63630124 63630124
12622140
19950620
05350314 05350314
00000000 00000000
01231023
01005010 01005010
05125102 05125102
75647108 75647108
16325903 68423216
69080697 69080697
89015900 89015900
85776639 85776639
...@@ -42,15 +37,11 @@ ...@@ -42,15 +37,11 @@
31076101 31076101
47394498 47394498
87886752 87886752
33632704
25677306
61586785 61586785
59999013 59999013
46613842 46613842
12179967 12179967
94733297 94733297
26190130
18098895
73251579 73251579
90576241 90576241
48146876 48146876
...@@ -59,23 +50,18 @@ ...@@ -59,23 +50,18 @@
72173939 72173939
72666260 72666260
66671921 66671921
26726955
92520995 92520995
82750153 82750153
26178565
77830346 77830346
30281149 30281149
25270306
56308817 56308817
42695503 42695503
26658843
47971588 47971588
70399033 70399033
01148576 01148576
43534016 43534016
55624195 55624195
74718539 74718539
13194366
40374235 40374235
48232691 48232691
52177304 52177304
...@@ -84,56 +70,46 @@ ...@@ -84,56 +70,46 @@
66098901 66098901
90274011 90274011
58712106 58712106
29513228
67480508 67480508
22480823
60001170 60001170
00573954 00573954
76403394 76403394
66719620 66719620
42194168 42194168
30454093
43700710 43700710
49206642 49206642
19050312 61541086
18477187 38512621
76913858 76913858
65456325 65456325
67468364 67468364
40322698
71110225 71110225
34072948 42862601
52792361 52792361
91356650 91356650
59748044 59748044
22492255
85214220 85214220
99766230 99766230
97808745 97808745
96760981 96760981
51643430 51643430
27616899
44455252 44455252
51131375 51131375
13747544
45842904 45842904
93585407 93585407
59773910 59773910
34737213
73106602 73106602
86993873 86993873
34098657
91737368 91737368
25010513
51292787 51292787
45669033 45669033
31219168
46599992 46599992
88451117 88451117
98463787 98463787
48588674 48588674
91481541 91481541
68506344 68506344
34084412
04066904 04066904
15058795 15058795
94724505 94724505
...@@ -163,10 +139,8 @@ ...@@ -163,10 +139,8 @@
25744498 25744498
22129367 22129367
97626535 97626535
19960227
46549521 46549521
40014537 40014537
12934157
09406991 09406991
79337452 79337452
58938757 58938757
...@@ -175,7 +149,6 @@ ...@@ -175,7 +149,6 @@
70652660 70652660
68523884 68523884
95127902 95127902
26978802
66692786 66692786
92581606 92581606
81851473 81851473
...@@ -189,12 +162,10 @@ ...@@ -189,12 +162,10 @@
07588580 07588580
97267380 97267380
20311970 20311970
14512204
91668853 91668853
81786156 81786156
53580614 53580614
65394671 65394671
20170622
69749767 69749767
94169705 94169705
91538701 91538701
...@@ -202,77 +173,70 @@ ...@@ -202,77 +173,70 @@
80749971 80749971
93141007 93141007
42105198 42105198
27919421
67605850 67605850
57734801 57734801
49429879 49429879
23016094
48259090 48259090
79648989 79648989
23105385
75211145 75211145
41957663 41957663
44662304 44662304
58739994 58739994
86780202 86780202
76735227 76735227
34826796
62259189 62259189
19843125
31959022
76714270 76714270
52247289 52247289
76552886 76552886
23410323
14234083
98452928 98452928
69627834 69627834
43418243 43418243
97289076 97289076
19861406
25305837
89538308 89538308
79538354 79538354
71899542 71899542
50983974 50983974
49588902 49588902
23016955 07092402
76100381 76100381
98208297 98208297
83045395 83045395
01023846 01023846
76069941 76069941
99633698 99633698
39722618
76389029 76389029
70751741
66896111 66896111
08819329 08819329
43735787 43735787
93723575
56001021
39248743 39248743
62430103 62430103
50141509
50544248 50544248
25238156
82413605 82413605
73962945
88743838 88743838
21557290
03193932 03193932
72751836
39572459
95208604 95208604
69735918 69735918
78002220
79459517 79459517
10754337
51846459 51846459
53669009 53669009
50418079 50418079
50051412 50051412
30256622
98093808 98093808
41145558 41145558
52079169 52079169
06742496 06742496
92826429 92826429
45802360 45802360
32028322
39045186 39045186
17259061
40265551 40265551
81894060 81894060
37213845 37213845
...@@ -282,25 +246,25 @@ ...@@ -282,25 +246,25 @@
17090899 17090899
11915129 11915129
95774347 95774347
17440827
85340761 85340761
67698476 67698476
15592864
81940873 81940873
75790728 75790728
54730110 54730110
47834298 47834298
01217491 01217491
11314925
79567967 79567967
97067005 97067005
35599015
57409900 57409900
57408232 57408232
69556912 69556912
56231607
43632209
82322594
64223274
07734837 07734837
07583151
60751764 60751764
17480324
92103650 92103650
29780170 29780170
82521594 82521594
...@@ -328,17 +292,17 @@ ...@@ -328,17 +292,17 @@
13002164 13002164
19915897 19915897
27565667 27565667
10082519
87389814 87389814
76862715
80614365 80614365
80013876 80013876
71464892 71464892
14659579
99158442 99158442
78441294 78441294
41794390 41794390
78955281 78955281
33958238
49163839 49163839
83261533 83261533
85388308 85388308
ֲۦv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment