CALENDAR with One PrintF Function

i am making one month calned with ONE PrintF Command Here is The code


#include <stdio.h>
#include <conio.h>
int main(void)
{
printf("\n***************************************\n\n***************** March ***************\n\n***************************************\n\nSu\tMo\tTu\tWe\tTh\tFr\tSa\n\t\t\t\t\t\t1\n2\t3\t4\t5\t6\t7\t8\n9\t10\t11\t12\t13\t14\t15\n16\t17\t18\t19\t20\t21\t22\n23\t24\t25\t26\t27\t28\t29\n30\t31");

getch ();
return 0;
}


I need to adjust the calendar Exactly Under the 39 ****that are shown in 1st line

How can make custom spaces instead of \t that are 5 spaces after every digit

i have done with the SPACE BAR LIKE THIS

#include <stdio.h>
#include <conio.h>
int main(void)
{

printf("\n***************************************\n\n***************** March ***************\n\n***************************************\n\nSu Mo Tu We Th Fr Sa\n\t\t\t\t 1\n2 3 4 5 6 7 8\n9 10 11 12 13 14 15\n16 17 18 19 20 21 22\n23 24 25 26 27 28 29\n30 31");

getch ();
return 0;
}


but i need with a proper function
Plz help

1
2
3
4
5
6
7
8
9
10
11
printf("\n"
"***************************************\n\n"
"***************** March ***************\n\n"
"***************************************\n\n"
"Su    Mo    Tu    We    Th    Fr    Sa\n"
"                                     1\n"
" 2     3     4     5     6     7     8\n"
" 9    10    11    12    13    14    15\n"
"16    17    18    19    20    21    22\n"
"23    24    25    26    27    28    29\n"
"30    31");
Thank you so much;;
Topic archived. No new replies allowed.