#include <ncurses.h>#include <time.h>main() { srand(time(NULL)); initscr(); start_color(); init_pair(1, COLOR_CYAN, COLOR_BLACK); attron(COLOR_PAIR(1)); for(;; gnu_linux()); } gnu_linux(){ int x_kord, y_kord; x_kord=rand()%24; y_kord=rand()%71; const time_t ttime = time(NULL); int hours = localtime(&ttime)->tm_hour; int minutes = localtime(&ttime)->tm_min; int seconds = localtime(&ttime)->tm_sec; clear(); move(x_kord, y_kord); printw("%d:%d:%d", hours, minutes, seconds); move(24,79); refresh(); sleep(1);}
#include <stdio.h>#include <stdlib.h>#include <unistd.h>