Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8843017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:06:40+00:00 2026-06-14T11:06:40+00:00

For school I have to do a assignment, Im busy with it for like

  • 0

For school I have to do a assignment, Im busy with it for like 3 weeks now and still havn’t gotten far. We need to make a clock that has to be round and the colours of the seconds minutes AND hours need to light up. So if it’s 4:25 am those numbers need to light up.

This is what I’ve got right now:

   #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;

    }

Can anyone tell me how I could possibly do this? I’m not asking you to do my homework.. I just really need some help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:06:42+00:00Added an answer on June 14, 2026 at 11:06 am

    OK, so based on your comments it sounds like you’re using Windows and you really just want to set a color. That’s pretty easy. You want the SetConsoleTextAttribute() function, here’s a very quick example:

    #include <stdio.h>
    #include <Windows.h>
    #include <string.h>
    
    void main()
    {
        printf("Hello\n");  // Print white text on black output
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED);
        printf("Hello Again!\n");  // Print Red text on black output
        getchar(); // Pause the program to admire the colors
    }
    

    For further highlighting you can also change the back ground, you can OR (|) together flags to get different colors and different back/fore grounds.

    So if you wanted to do red text on a green back ground (for some reason) you could do:

    FOREGROUND_RED | BACKGROUND_GREEN
    

    enter image description here

    I think that’s all you were really asking for, now you can take that and apply it to your clock, getting the time and highlighting the color.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For an assignment at school, we have to use structs to make matrices that
I have an assignment for school: I need to make a user database. First
I currently have a school assignment that involves both PHP and asp.net. Now the
For a school assignment I have to create a C++ program that will create
Hello is have a question for a school assignment i need to : Read
I have to implement a search algorithm for a school assignment. Right now, i'm
I have a school assignment that should be written in C++98-compliant code. How can
I need to implement a chess game for a school assignment, and you have
I have an assignment at school to build a webserver that handles GET/HEAD/PUT requests,
I have a school assignment where I need to create a data-driven style of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.