Monday, April 3, 2023

1st project :: create a digital watch in c using for loop

  //create a digital watch in c using for loop

 #include "stdio.h"
 #include "conio.h"
 #include "stdlib.h"
 int main (){
    int h=0,m=0,s=0;
    double i;
    printf ("enter the time format like HH:MM:SS\n ");
    scanf ("%i%i%i",&h,&m,&s);
    start :;
    for (h;h<24;h++){
        for (m;m<60;m++){
            for (s;s<60;s++){
                system ("cls");
                printf ("\n\n\n\n\n\t\t\t\t\t %d:%d:%d\n",h,m,s);
                for (i=0;i<89999900;i++){
                      i++;
                      i--;
                }
            }
            s=0;
        }
        m=0;
    }
    h=0;
    goto start;
    return 0;
 }

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...