void search char file FILE struct monets int kol cen double sum system

 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
void search(char *file){
FILE *f;
struct monets m;
int n=0, kol=0, cen;
double sum;
system("cls");
if ((f=fopen(file,"rb"))== NULL){
puts("ЋиЁЎЄ  ®вЄалвЁп д ©« ");
system("PAUSE");
return;
}
puts("‚ўҐ¤ЁвҐ ўҐЄ ¤«п ®Ја ­ЁзҐ­Ёп");
scanf("%d", &cen);
cen *=100;
puts("ь | ’€Џ ЊЋЌ…’ | ‘’ђЂЌЂ | ЌЋЊ€ЌЂ‹ | ѓЋ„ | ЉЋ‹€—…‘’‚Ћ | –…ЌЂ ");
while(fread(&m,sizeof(m),1,f)){
if(m.year < cen){
n++;
graf(80);
printf("%2d| %11s| %12s| %8.1lf| %6d| %12d| %7.1lf\n",n,m.metal, m.country,m.nominal,m.year,m.count,m.price);
}
}
if(n==0){
system("cls");
puts("‡ ЇЁбҐ© ­Ґв");
}
fclose(f);
system("PAUSE");
}