there is an easy way that includes all of the "days" conditions that can be in the year? leap year, long/shot months, etc... trying to make it shorter but easy to understand for someone new at code like me
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
typedef struct date
{
int day;
int month;
int year;
} date;
int main()
{
date d;
printf("\nPlease enter the date DD/MM/YYYY format and i will raise it up \n");
scanf_s("%d/%d/%d", &d.day, &d.month, &d.year);
printf("you enter: %02d/%02d/%04d", d.day, d.month, d.year);
d.day++;
if (d.day == 29 && d.month == 2)
{
d.month++;
d.day = 1;
}
if (d.day == 32 && d.month == 3)
{
d.month++;
d.day = 1;
}
if (d.day == 32 && d.month == 12)
{
d.year++;
d.month = 1;
d.day = 1;
}
printf(" tomorrow date: %02d/%02d/%04d", d.day, d.month, d.year);
}