Countdown Timer

an anonymous user · November 22, 2023
#include <stdio.h>

int main() {
    int seconds;
    
    printf("Enter the number of second to start the count down: \n");
    scanf("%d", &seconds);

    while (seconds > 0) {
        printf("%d...\n", seconds);
    
        seconds--;
    }

    printf("Time's up!");

    return 0;
}
Output

Comments

Please sign up or log in to contribute to the discussion.