Thread: Runnig A Clock??????????

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Runnig A Clock??????????

    Code:
    I HAVE WRITTEN APROGRAM OF DISPLAYING TIME
    WHEN WE RUN PROGRAM IT GIVE OUT PUT ATTHAT DATE&TIME
    I WANTED GET GET CONINUOUS OUT PUT ONLY ONCE RUN A PROGRam
    
    
    #include<stdio.h>
    #include<conio.h>
    #include<dos.h>
    main()
    {
    struct date d;
    struct time t;
    clrscr();
    getdate(&d);
    getdate(&t);
    goto(30,10);
    printf("%d/%d/%d",d.da_day,d.day_mon,d.da_year);
    goto(30,12);
    printf("%d:%d:%d",t.ti_hour,t.ti_min,t.ti_sec);
    getch();
    }

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    You want the goto, to be gotoxy().

    I'm having a bit of trouble figuring out what you question was about the program you posted.

    What compiler are you using? It looks from the code, like Turbo C or Borland C.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Logical Error in Clock program
    By SVXX in forum C++ Programming
    Replies: 0
    Last Post: 05-10-2009, 12:12 AM
  2. Outside influences on clock cycles? (clock_t)
    By rsgysel in forum C Programming
    Replies: 4
    Last Post: 01-08-2009, 06:15 PM
  3. Clock Troubles
    By _Nate_ in forum C Programming
    Replies: 22
    Last Post: 06-19-2008, 05:15 AM
  4. clock program
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 10:12 PM
  5. System clock
    By bazzano in forum C Programming
    Replies: 10
    Last Post: 03-27-2007, 10:37 AM