Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

C PROGRAM TO MAKE A DIGITAL CLOCK

USING C GRAPHICS

In this program, we will make a digital clock that print current Day, Month, Year and Date on
screen inside a rectangular box. We will use below mentioned graphics functions in this
program. Here, we are using time function of time.h header file to get the current epoch
time(epoch time is number of seconds since 1 January 1970, UTC). We convert epoch time to
string representing the localtime in "www mmm dd hh:mm:ss yyyy" format, where www is the
weekday, mmm is the month in letters, dd is the day of the month, hh:mm:ss is the time, and
yyyy is the year. After printing current date and time on screen, it waits for 1000 milliseconds(1
second) before printing it again on screen.
SIMPLIFICATION FOR LOGIC EXPRESSION
Moving Boat - C Graphics

You might also like