- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
int month, print_client, records_printed = 0;
int distinc[LENGTH];
// получение month, создание файла и что-то ещё...
for (int ci = 0; ci < clen; ci++)
{
print_client = 0;
for (int i = 0; i < LENGTH; i++)
if (distinc[i])
distinc[i] = 0;
else break;
for (int ri = 0; ri < rlen; ri++) {
if (clients[ci].number == records[ri].number && records[ri].cdate.month == month)
{
if (!print_client)
fprintf(file, "%s, %lli:\n", clients[ci].fullname, clients[ci].number);
++print_client;
int service = records[ri].service;
for (int i = 0; i < LENGTH; i++)
{
if (distinc[i])
{
if (distinc[i] == service)
service = 0;
}
else
{
distinc[i] = service;
break;
}
}
if (service)
{
for (int si = 0; si < slen; si++)
{
if (service == services[si].code)
{
fprintf(file, "\t%s\n", services[si].name);
++records_printed;
break;
}
}
}
}
}
}
guest8 31.12.2019 00:01 # −999