Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- It is a Timer! Enter the amount of minutes (m) and seconds (s).
- */
- #include <stdio.h>
- #include <windows.h>
- int main(){
- int m, s;
- printf("Enter m, s: ");
- scanf("%d %d", &m, &s);
- while(m > -1){
- system("cls");
- printf("time left (m:s): %2d : %2d\n", m, s--);
- Sleep(1000);
- if(s == -1){
- s = 59;
- m--;
- }
- }
- printf("\nEnd!\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement