<分区>
为了上学,我必须做作业,我已经忙了大约 3 个星期了,但还没有完成。我们需要制作一个必须是圆形的时钟,秒分和小时的颜色需要亮起。因此,如果现在是凌晨 4:25,则这些数字需要亮起。
这是我现在得到的:
#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <unistd.h>
#include <stdlib.h>
#include <windows.h>
int csecs (int cseconds );
void main (int sec, int min){
printf("Hallo! Veel plezier met het bekijken van de tijd!");
getch();
while (sec)
{
time_t cseconds;
cseconds = time (NULL);
printf ("De Tijd: ");
printf ("%d:", csecs( cseconds )/60/60%24+1);
printf ("%d:", csecs( cseconds )/60%60 );
printf ("%d", csecs( cseconds )%60 );
Sleep(1000);
system("cls");
}
}
int csecs (int cseconds)
{
return cseconds;
}
谁能告诉我怎么可能做到这一点?我不是要你做我的功课..我只是真的需要一些帮助。