can anybody help me to write the following program.
program that will return the day of the particular date and year?
i.e.,user gives date,month and year.we have to print the day of it.

Re: can anyboby help me? 80 80

>>can anybody help me to write the following program
Yes someone here will help you but you first have to post your code and ask questions about what you don't understand. We will not write the program for you.

Re: can anyboby help me? 80 80

i don't know the logic of this program.will u plz tell the logic?

Re: can anyboby help me? 80 80

First declare three integers -- day, month and year. Then call scanf() to get user keyboard input. Finally call printf() to display the day.

Re: can anyboby help me? 80 80

>>print the day of it. That's what happens when you try to paraphrase the assignment.
I misunderstood that -- I did not realize it meant the day of the week.

Re: can anyboby help me? 80 80

user will give only date,month,year.we have to find out the day of it.
for eg:if we gave 26-08-2007
it should print sunday.user will not give the day.

Re: can anyboby help me? 80 80

I don't know, if iamthwee's link doesn't give you the answer then I guess there isn't one.

Re: can anyboby help me? 80 80

Can you use the standard library for this exercise. If so, look into mktime and localtime .

Re: can anyboby help me? 80 80

In general, you have to assign a specific date to be your ultimate beginning date. Then you calculate the exact number of days from that day to the day entered by the user. Then you can calculate the day-of-the-week from that value using the modulus (%) operator.

Be a part of the DaniWeb community

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