# Thread: i have no idea..

1. ## i have no idea..

Can anyone do this question? i have no idea how to do it cos im a newbie, it should only take a veteran a few minutes to do, im desperate here, thank you, brad.

question; using a structure variable(including day, month and year), the programme reads a date from the keyboard and then find out how many days away from 25 december (note: leap years must be considered).

2. Ehm, you need a structure like this:

Code:
```struct date
{
int day;
int month;
int year;
}```
You can use scanf or something like that to read in a date from the keyboard.

How many days away from 25 december which year?

3. it has to be calculable from any year before 2003

4. I see. And what is your question? I do not understand what your problem is.

Could you perhaps post the code which causes the problem(s)?
[/edit]

5. ok the problem i have is that im really bad with c, ive only just started and ive to do a few questions, this is the last one and i havent a clue where to start. its crucial that i do it by 2nite, im sorry that im asking ppl to do it for me but i have no other options...

6. The first thing is to make clear what they want to. I think you want to go coding directly, but first make clear which algorithms you need.

Input: a date
Output: days since 25 december of a certain year

It's unclear to me which year is the year you have to calculate from.

How would you calculate the number of days since that certain year?

7. i would input a date say 14.01.2001 and the output would be 351 days (days until 25.12.2002). to calculate a leap year, 1 thought was to make it realise that the year 2000 was a leap year and therefore make it also realise that every 4 years before that is as well. maybe by adding a year onto every 1460 days (every 4 years) starting from 2000 and back from then.

8. question; using a structure variable(including day, month and year), the programme reads a date from the keyboard and then find out how many days away from 25 december (note: leap years must be considered).
Perhaps if you read your previous posts then you would realize I've already answered this question in full. What, do you want it written for you?

-Prelude

9. Originally posted by Prelude

Perhaps if you read your previous posts then you would realize I've already answered this question in full. What, do you want it written for you?

-Prelude
You had to ask? Of course they want it written for them! It's HOMEWORK!

Quzah.

Not really, the answer was obvious anyway.

>Of course they want it written for them! It's HOMEWORK!
True, but they could at least show some respect and not post the same question after it's already been answered. It's incredibly rude.

-Prelude

11. sorry guys for wastin your time, and i didnt mean to be rude, its just im no expert with c nor will i ever be, but for this particular module, it is very important. Brad.

12. >sorry guys for wastin your time
You're not wasting our time, but it usually helps to read the replies to your posts before starting a new thread.

>for this particular module, it is very important
Take a look here for all the answers you asked for earlier: