#define _XOPEN_SOURCE #include #include #include #include int main() { char dateStr[11]; struct tm t; fgets(dateStr, 11, stdin); strptime(dateStr, "%d.%m.%Y", &t); t.tm_mday += 7; if(t.tm_mon + 1 < 10){ printf(" %d.0%d.%d\n\n", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); } else{ printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); } exit(EXIT_SUCCESS); return 0; }