how to create a Clock in C Programming language. - learnit

Home Top Ad

Post Top Ad

Tuesday, March 23, 2021

how to create a Clock in C Programming language.

how to create a Clock in C Programming language.

How to create a Clock in C Programming language

C Programming

C programming is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers.


Why to Learn C Programming?

C programming language is necessary for students and working professionals to become a great Software Engineer especially when they are working in Software Development Domain. I will list down some of the key advantages of learning C Programming:


-Easy to learn

-Structured language

-It produces efficient programs

-It can handle low-level activities

-It can be compiled on a variety of computer platforms


Of course, coding is always different no matter what the language you use, but the important thing is that we reach our goal of which path to take to get there. Today I am writing A code used to create a Clock using the C Programming language, if you want to know, see my code and my video below

Example

#include<stdlib.h>
#include<string>
#include<conio.h>
int main()
{
int h=0,m=0,s=0;
system("cls");
printf("Please enter a time format in HH:MM:SS");
scanf("%d%d%d,",&h,&m,&s);
start:
for(h;h<24;h++)
{
for(m;m<60;m++)
{
for(s;s<60;s++)
{
system("cls");
printf("%d:%d:%d",h,m,s);
printf("Sunday 6-Dec-2020");
if(h<12){
printf(" AM");
}
else{
printf("PM");
}
for(double i=0;i<3619999;i++)
i++;}s=0;}m=0;}h=0;goto start;
getch();}

Please Watching My Video is Below

No comments:

Post a Comment

Post Top Ad