- 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
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 50
#define K 6
main()
{int i,j,n,error,max,imax,min=0,imin=0;
int a[N][K],b[N][K];
long c[N],r;
do
{error=0;
printf("Vvedite kol-vo raznih dat: ");
scanf("%d",&n);
if(n<1 || n>N)
{printf("\nVi vveli kol-vo elementov massiva men'she 2 ili bol'she 50!\nPovtorite vvod!\n\n");
error=1;
}
}
while (error);
printf("\nDati v formate GG MM DD cc mm ss:\n");
for(i=0;i<n;i++)
{do a[i][0]=rand()%2008; while(a[i][0]<1970);
do a[i][1]=rand()%13; while(a[i][1]<1);
do a[i][2]=rand()%32; while(a[i][2]<1);
a[i][3]=rand()%24;
a[i][4]=rand()%60;
a[i][5]=rand()%60;
printf("\nData %d:",i+1);
for (j=0;j<K;j++)
printf(" %.2d",a[i][j]);
}
max=0;
for(i=0;i<n;i++)
if (a[i][0]>max)
{
max=a[i][0];
imax=i;
}
min=a[0][0];
for(i=0;i<n;i++)
if (a[i][0]<min)
{
min=a[i][0];
imin=i;
}
for(i=0;i<2;i++)
{
for(j=0;j<K;j++)
{
b[i][j]=a[imax][j];
}
imax=imin;
}
for(i=0;i<2;i++)
{
printf("\n");
for(j=0;j<K;j++)
printf(" b[%d,%d]=%d",i,j,b[i][j]);
}
for(i=0;i<2;++i)
{
c[i]=(b[i][0]-1971)*31536000;
c[i]+=b[i][2]*86400;
c[i]+=b[i][3]*3600;
c[i]+=b[i][4]*60;
c[i]+=b[i][5]-86400;
c[i]+=((b[i][0]-69)/4)*86400;
if(b[i][1]>12)
c[i]+=31*86400;
if(b[i][1]>11)
c[i]+=30*86400;
if(b[i][1]>10)
c[i]+=31*86400;
if(b[i][1]>9)
c[i]+=30*86400;
if(b[i][1]>8)
c[i]+=31*86400;
if(b[i][1]>7)
c[i]+=31*86400;
if(b[i][1]>6)
c[i]+=30*86400;
if(b[i][1]>5)
c[i]+=31*86400;
if(b[i][1]>4)
c[i]+=30*86400;
if(b[i][1]>3)
c[i]+=31*86400;
if(b[i][1]>2)
c[i]+=28*86400;
if(b[i][1]>1)
c[i]+=31*86400;
if(((b[i][1]==2 && b[i][2]==29) || b[i][1]>2) && b[i][1]>1 && b[i][0]%4==0 && b[i][0]%100!=0 || b[i][0]%400==0)
c[i]+=151936;
}
printf("\n\nDati v formate vremennoi metki UNIX:\n\n");
for(i=0;i<2;i++)
{printf("Data %d: %ld\n",i+1,c[i]);
}
r=c[0]-c[1];
-------------------------------------------------------------------
Препараты из Китая, лечебные порошки, ароматические свечи, тампоны вагинит лечения
гигиенический шампунь
https://www.zbfarm.info/
__________________________