#include struct xronos { int hours; int minutes; int seconds; }; void update(t) struct xronos *t; { (*t).seconds++; if((*t).seconds==60) { (*t).seconds=0; (*t).minutes++; } if((*t).minutes==60) { (*t).minutes=0; (*t).hours++; } if((*t).hours==24) (*t).hours=0; delay(); } void display(t) struct xronos *t; { printf("%d:", t->hours); printf("%d:",(*t).minutes); printf("%d\n",(*t).seconds); } int delay() { long int t1; for (t1=1; t1<1000000; ++t1); return (1); } main() { struct xronos newtime; newtime.hours=0; newtime.minutes=0; newtime.seconds=0; do { update(&newtime); display (&newtime); } while(1); }