Thanks for the advice AD but if I don't think this through, I never learn C. Also, I think this assignment is looking for me to understand pointers (which is totally confusing to me) and probably most people when your first learning C. Unless your a genius. Anyways, I worked on this problem some more. I'm trying to figure the century (C) and year (Y) in step (c) and I'm wondering if I'm on the right track with the code I've added. If I am, can someone explain to me how I can figure the year using this pointer?
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int day,month,year;
int M,C
int *pYear;
char more [2];
do
{
printf ("Enter the date: (mmddyyyy)");
scanf ("%d","%d","%d",&day,&month,&year);
pYear=(int*)malloc(year*sizeof(int));
if (month > 2)
month-=2;
else
{
month = 10 + month;
year--;
)
M = (26*10)-2)/10;
C =
printf ("Continue? (y/n):");
scanf ("%s",&more);
}
while (more [0] != 'n');
return 0;
}