21 lines
608 B
C
21 lines
608 B
C
#include <stdio.h>
|
||
#include <unistd.h> // для usleep
|
||
#include <string.h> // для strlen
|
||
|
||
int module_04_run() {
|
||
const char *text = " Permission denied.";
|
||
const char *red = "\033[1;31m";
|
||
const char *reset = "\033[0m";
|
||
|
||
printf("%s", red); // включаем красный
|
||
|
||
for (size_t i = 0; i < strlen(text); i++) {
|
||
printf("%c", text[i]);
|
||
fflush(stdout); // выводим сразу
|
||
usleep(100000); // задержка 0.1 секунды
|
||
}
|
||
|
||
printf("%s\n", reset); // сброс цвета и перенос строки
|
||
return 0;
|
||
}
|