díky :))
#include "stdafx.h"
#include "stdlib.h"
#include "time.h"
int _tmain(int argc, _TCHAR* argv[])
{
int x2, x3;
do
{
x2 = rand() % 15;
x3 = x2 + 7;
time_t result;
result = time(NULL)+(x3*86400);
struct tm* brokentime = localtime(&result);
printf("expirace je %d dni, to je do dne %s \n", x3, asctime(brokentime), (long)result);
getchar();
} while (x3>x2);
return(0);
}
řešení :)