Rookie post for the first time. So afraid
#include <stdio.h> #include <windows.h>int main () {int A[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int I,j,num,q,year,day; Setconsoletextattribute (GetStdHandle (std_output_handle), foreground_red| foreground_green| foreground_intensity);p rintf ("Please enter years after 1900:"); while (scanf ("%d", &year)!=eof) {int mark=1;for (i=1900;i< year;i++) {if (i%4==0&&i%100!=0| | i%400==0) day=366;elseday=365;mark= (Mark+day)%7;} if (year%4==0&&year%100!=0| | year%400==0) a[2]=29;elsea[2]=28;for (i=1;i<13;i++) {Setconsoletextattribute (GetStdHandle (STD_OUTPUT_HANDLE), foreground_red| foreground_blue| foreground_intensity); {printf ("****************%d month ****************\n", i);} Setconsoletextattribute (GetStdHandle (std_output_handle), foreground_blue| foreground_intensity); {printf ("t \ t two \ \ Three \ Four \ five \ t six \ n");} Setconsoletextattribute (GetStdHandle (std_output_handle), foreground_green| foreground_intensity); num=1;for (q=0;q<mark;q++) printf ("\ T"), for (q=mark;q<7;q++) printf ("%d\t", num++); printf ("\ n"); while (num<=a[i]) {for (j=0;j<7;j++) {if (Num<=a[i]) printf ("%d\t", num++), mark= (j+1)%7;} printf ("\ n");} printf ("\ n");} Setconsoletextattribute (GetStdHandle (std_output_handle), foreground_red| foreground_green| foreground_intensity);p rintf ("####### #by: Sew Sew ########\n");} return 0;}
C written in 1900-Calendar of a future year