answersLogoWhite

0

#include<stdio.h>

void printMonth (int startDay, int days);

int main (void)

{

printfMonth(2,29);

return 0;

}

/*======printMonth===========*/

void printMonth (int startDay, int days)

{

int weekDay;

int dayCount = 0;

{

printf("Sun Mon Tue Wed Thu Fri Sat\n");

printf("--- --- --- --- --- --- ---\n");

for (weekDay= 0; weekDay < startDay; weekDay++)

{printf(" ");}

for (int dayCount = 1; dayCount <= days; dayCount++)

{

if (weekDay > 6)

{

printf("\n");

weekDay = 1;

}

else

weekDay++;

printf("%3d", daycount);

}

printf("\n--- --- --- --- --- --- ---\n");

return;

}}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


Write a c program for creating a virus?

a c program for creat a virus


Where do we write main function in a c program?

Into the source program.


Write a c program to find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


How do you write a c program to analysis a circuit?

There is no need to write a C program for circuit analysis; there are lots of packages out there that already do that (for example, Spice).


How do you generate a parse tree from an expression using C program?

c code for top down parser


How do you write a C program to check whether the number is odd or even Ps-using DEV complier?

To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.


How do you write socket program in c?

For first find an example program.


How do you write a program in embedded c?

Use a text-editor program.


How do you make calendar program in c language?

/*program to write the calender of july 2012*/ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int sun,mon,tue,wed,thurs,fri,sat,i; clrscr(); printf("sunmontuewedthrusfrisat");


How do you write an Algorithm for a C plus plus Program?

You don't write an algorithm for a C++ program, unless you are documenting the C++ program after-the-fact. The normal procedure is to write the algorithm first, in a language independent fashion, and then translate that stated algorithm into C++ code, or into whatever language you wish.