Premium Only Content
This video is only available to Rumble Premium subscribers. Subscribe to
enjoy exclusive content and ad-free viewing.

Create Your Own Digital Clock In C Language
3 years ago
2
In this video we will learn about how to create a digital clock using c language
SOURCE CODE
#include <stdio.h>
#include <windows.h>
int main()
{
int h,m,s;
int d=1000;
// we add a delay of 1000 milliseconds and we will use it in the function sleep
printf("Set time : \n");
scanf("%d%d%d",&h,&m, &s);
if(h>12 || m>60 || s>60)
{
printf("ERROR ! \n");
exit(0);
}
while(1)
// this is an infinite loup and anything inside will repeat itself to infinity
{
s++;
if(s>59)
{
m++;
s=0;
}
if(m>59)
{
h++;
m=0;
}
if(h>12)
{
h=1;
}
printf("\n Clock :");
printf("\n d:d:d",h,m,s);
// this writes our time in this format 00:00:00
Sleep (d);
// the function sleep slows down the while loop and make it more like a real clock
system("cls");
// this clears the screen
}
}
Loading comments...
-
LIVE
Game On!
16 hours agoNFL Week 4 Betting Report Preview!
1,737 watching -
21:05
Adam Does Movies
21 hours ago $0.62 earnedAlien: Earth Episode 8 - Recap
3.26K3 -
18:49
World2Briggs
18 hours ago $0.31 earnedTop 10 States To retire in 2026 According to Experts
1.62K4 -
19:03
Blackstone Griddles
13 hours agoParmesan Ranch Chicken Sandwich oxn the Blackstone Griddle
3.84K3 -
LIVE
BEK TV
23 hours agoTrent Loos in the Morning - 9/26/2025
196 watching -
LIVE
The Bubba Army
22 hours agoJimmy Kimmel's Audience Plummets by 20 MILLION! - Bubba the Love Sponge® Show | 9/26/25
1,426 watching -
17:24
Sponsored By Jesus Podcast
21 hours agoLoving Our ENEMIES & Praying for Those Who Hurt Us
3.43K3 -
4:22
NAG Daily
14 hours agoSaving Grace #4 — Is The BIBLE Wrong?
10.7K5 -
6:14
Sugar Spun Run
1 day ago $1.02 earnedApple Cobbler
7.73K4 -
31:26
Clownfish TV
6 days agoJimmy Kimmel GONE FOR GOOD?! Insider Claims Disney is DONE! | Clownfish TV
13.4K27