My program intends to achieve this
(A) Write a C function named larger() that returns the later date of any two dates passed to it. For
There are several little corrections needed in this program but your main problem is the difference between while and do while loops.
while()
{
//Something
}
and
do
{
//Something
}
while()
differ in the fact that do while enters the loop atleast once and then checks for the condition to be satisfied. But while on the other hand never enters the loop if the condition is not satisfied. So in a nutshell you aren't entering the while loop and hence aren't reading anything from the user.