calender problem in C

i want to print out the months of a year which is enterd by the user in the following format. how to do?

Jan Feb Mar
S M T W T F S S M T W T F S S M T W T F S
1 2 3 4 5 6 7 - - - - - - - - - - - - - -
8 9 10 11 12 13 14 same here same here
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

3 months on each row, so 12 months have to be printed. please help.
this is my first posting - hello all

Comments

  • : i want to print out the months of a year which is enterd by the user in the following format. how to do?
    :
    : Jan Feb Mar
    : S M T W T F S S M T W T F S S M T W T F S
    : 1 2 3 4 5 6 7 - - - - - - - - - - - - - -
    : 8 9 10 11 12 13 14 same here same here
    : 15 16 17 18 19 20 21
    : 22 23 24 25 26 27 28
    : 29 30 31
    :
    : 3 months on each row, so 12 months have to be printed. please help.
    : this is my first posting - hello all
    :
    I'd just print it out. There's no use in using counters and loops and all that.
  • : : i want to print out the months of a year which is enterd by the user in the following format. how to do?
    : :
    : : Jan Feb Mar
    : : S M T W T F S S M T W T F S S M T W T F S
    : : 1 2 3 4 5 6 7 - - - - - - - - - - - - - -
    : : 8 9 10 11 12 13 14 same here same here
    : : 15 16 17 18 19 20 21
    : : 22 23 24 25 26 27 28
    : : 29 30 31
    : :
    : : 3 months on each row, so 12 months have to be printed. please help.
    : : this is my first posting - hello all
    : :
    : I'd just print it out. There's no use in using counters and loops and all that.

    thanx. but when i print it out the months appear vertically like
    Jan
    ------
    -------
    Feb
    ------
    --------
    & so on. Is there any way that i can print them out horizontally?

  • : : : i want to print out the months of a year which is enterd by the user in the following format. how to do?
    : : :
    : : : Jan Feb Mar
    : : : S M T W T F S S M T W T F S S M T W T F S
    : : : 1 2 3 4 5 6 7 - - - - - - - - - - - - - -
    : : : 8 9 10 11 12 13 14 same here same here
    : : : 15 16 17 18 19 20 21
    : : : 22 23 24 25 26 27 28
    : : : 29 30 31
    : : :
    : : : 3 months on each row, so 12 months have to be printed. please help.
    : : : this is my first posting - hello all
    : : :
    : : I'd just print it out. There's no use in using counters and loops and all that.
    :
    : thanx. but when i print it out the months appear vertically like
    : Jan
    : ------
    : -------
    : Feb
    : ------
    : --------
    : & so on. Is there any way that i can print them out horizontally?
    :
    :
    Instead of just printing them out you could put them in a 2d array that is the same size as the screen (I think it's 80 X 25). Then you could make a function that puts a 2d array (a month) into that 2d array (a year) at an x, y position. So you can put the first one at (0, 0) and the second at (22, 0) and the third one at (44, 0). After that just make two more rows and you will have a 2d array with all of the information in it. Then all you will have to do is print out the 2d array.
  • : : : : i want to print out the months of a year which is enterd by the user in the following format. how to do?
    : : : :
    : : : : Jan Feb Mar
    : : : : S M T W T F S S M T W T F S S M T W T F S
    : : : : 1 2 3 4 5 6 7 - - - - - - - - - - - - - -
    : : : : 8 9 10 11 12 13 14 same here same here
    : : : : 15 16 17 18 19 20 21
    : : : : 22 23 24 25 26 27 28
    : : : : 29 30 31
    : : : :
    : : : : 3 months on each row, so 12 months have to be printed. please help.
    : : : : this is my first posting - hello all
    : : : :
    : : : I'd just print it out. There's no use in using counters and loops and all that.
    : :
    : : thanx. but when i print it out the months appear vertically like
    : : Jan
    : : ------
    : : -------
    : : Feb
    : : ------
    : : --------
    : : & so on. Is there any way that i can print them out horizontally?
    : :
    : :
    : Instead of just printing them out you could put them in a 2d array that is the same size as the screen (I think it's 80 X 25). Then you could make a function that puts a 2d array (a month) into that 2d array (a year) at an x, y position. So you can put the first one at (0, 0) and the second at (22, 0) and the third one at (44, 0). After that just make two more rows and you will have a 2d array with all of the information in it. Then all you will have to do is print out the 2d array.
    :
    thanx a lot. i'll try it now
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories