-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading.c
More file actions
43 lines (34 loc) · 737 Bytes
/
loading.c
File metadata and controls
43 lines (34 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void delay(int);
int main()
{
int i;
char clear[] = "clear";
for(i = 0;i < 6;++i)
{
system(clear);
printf("\n\n\n\n\nLoading\n\n");
delay(300);
system(clear);
printf("\n\n\n\n\nLoading.\n\n");
delay(300);
system(clear);
printf("\n\n\n\n\nLoading..\n\n");
delay(300);
system(clear);
printf("\n\n\n\n\nLoading...\n\n");
delay(300);
}
system(clear);
printf("\n\n");
}
void delay(int seconds)
{
clock_t start_time;
int milliseconds;
milliseconds = 1000*seconds;
start_time = clock();
while(clock() < start_time+milliseconds);
}