2
#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++) 
     {
               
               printf("%2d",i);
               if ((i+startDay)%7 > 0)        
                {    printf("   ");
                   system("color 6");}
                    
               else  
                    printf("\n ");
     }
     startDay = (startDay + numDays)%7;
     
     
     
            
     
     
     getchar();
     getchar();
}

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?.,

Edited by Nick Evan: Added code-tags

2
Contributors
2
Replies
6
Views
7 Years
Discussion Span
Last Post by Ancient Dragon
0

but it will only colorize my enter text...

I mean "my entire text"...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.