#include <stdio.h>
#include <stdlib.h>

#define SIZE 31

int main()
     int array[SIZE]={0};
     int i,j;
     int startDay=0,numDays=30;
     printf("  S   M    T    W    TH    F    S\n");
     for (i=1;i<=1+ startDay*5;i++)
     printf(" ");
     for (i= 1; i <= numDays; i++) 
               if ((i+startDay)%7 > 0)        
                {    printf("   ");
                   system("color 6");}
                    printf("\n ");
     startDay = (startDay + numDays)%7;

I used

system("color ");

but it will only colorize my enter text...
I only want to colorize the days in Sunday;

I dont know how to do it...Can anyone teach me please?.,

Recommended Answers

If you are using MS-Windows then use win32 api console functions.

Jump to Post

All 3 Replies

but it will only colorize my enter text...

I mean "my entire text"...

don't work dude

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.