Greetings, first post here so I hope everything's kosher.
Code:
main()
{
printf ("Enter initial date: ");
scanf("%d/%d/%d", &init_month, &init_day, &init_year);
printf ("Enter initial time: ");
scanf ("%d:%d", &init_hour, &init_minute);
printf ("Enter return date: ");
scanf("%d/%d/%d", &fin_month, &fin_day, &fin_year);
printf ("Enter return time: ");
scanf ("%d:%d", &final_hour, &final_minute);
if (init_month == 02)
days_in_month = leapchecker(init_year);
...
So, I have have a series of inputs before branching out into a set of if statements. The problem is that the final scanf statement does not end, and proceed with the rest of the code; I have to terminate manually. If I were to write a printf immediately following the last scanf, it does not execute. However, if I close the code immediately after the last scanf, it terminates normally.
Any advice would be appreciated.