C++:
struct datetime gunSonraTarihNe(struct datetime dt,int gun) { struct datetime iterator; iterator=dt; while(gun>0) { subat_Kontrol(iterator); gun--; if(iterator.day==aylar[iterator.month-1]) { iterator.day=1; if(iterator.month==12) { iterator.month=1; iterator.year++; } else iterator.month++; } else if(iterator.day<aylar[iterator.month-1]) iterator.day++; } return iterator; }