So I am trying to develop a program to convert Date Formats. i.e If the date entered (mm,dd,yy):02,16,91. The output should be like this : This the 16th day of February 1991.
And I've done this so far :
#include <stdio.h>
#include <stdlib.h>
int main()
{
int m,d,y;
printf("Please Enter the Date like this format (mm/dd/yy)>\n");
scanf("%d/%d/%d/\n",&m,&d,&y);
printf("The Day is %2d\n",d);
printf("The Month is %2d\n",m);
printf("The Year is %2d\n",y);
printf("This is the %2d Day of %2d %2d",d,m,y);
return 0;
}
Can you help me please ? What is the best way to do it and how ? Thanks


Sign In
Create Account

Back to top









