Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- void colle22(char *box)
- {
- int i;
- int j;
- int k;
- int l;
- i = 0;
- j = 0;
- k = my_strlen(box) + 1;
- while (1)
- {
- usleep(400000);
- if (i == my_strlen(box) + 1)
- i = 0;
- j = 0;
- my_putchar('\r');
- while (j < i)
- {
- my_putchar(' ');
- j = j + 1;
- }
- l = i;
- while (box[l])
- {
- my_putchar(box[l]);
- l = l + 1;
- }
- l = 0;
- while (i > l)
- {
- my_putchar(box[l]);
- l = l + 1;
- }
- while (j < my_strlen(box))
- {
- my_putchar(' ');
- j = j + 1;
- }
- i = i + 1;
- }
- }
- int main()
- {
- char box[] = "123456789";
- colle22(box);
- }
Add Comment
Please, Sign In to add comment