my additions:
those two bolded parts are what i meant above.
how would i print the day and year?
does the day and year stuff iadded look okay?
shit... i forgot to change it so the days go back to zero after 273
#include <stdio.h>
#include <unistd.h>
int main() {
int second;
int minute;
int hour;
int day;
int days;
int year;
second=0;minute=0;hour=0;day=6;days=199;year=2002;
while(1) {
if (second==59) {
second=0;
if (minute==59) {
minute=0;
if (hour==31) {
hour=0;
if (day==7) {
day=1;
if (hour!=31) {
days=days;
if (days==272) {
year++;
} else {
year=year
} else {
days++;
} else {
day++;
}
} else {
hour++;
}
} else {
minute++;
}
} else {
second++;
}
sleep(1);
printf("%0.2d:%0.2d:%0.2d 2d.2d \r",hour,minute,second,day,year);
fflush(0);
}
}
[/CODE]
those two bolded parts are what i meant above.
how would i print the day and year?
does the day and year stuff iadded look okay?
shit... i forgot to change it so the days go back to zero after 273
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]