i´m a sort of a newbie..
i´ve got a following array
and a -for-..Code:int months[12]={31,28,31,30,31,30,31,31,30,31,30,31};
where the days ans months have been asked from the user.Code:for(i=0;i<month;i++) { days=days+months[(i-1)]; }
For example, if the given months is 4, how do i get the -for-
to count days from the earlier months only (4-1)?
I think this counted the whole array together...