Results 1 to 8 of 8
  1. #1

    Default HELP My C-Programming Project


    hi to all! im having a problem in my project in c programming. we are going to make a calendar program that would display the month and the dates of any given year and month. i already started doing it but stuck because i have problem setting the first day of the month. i relate 0 to Sun, 1 to Mon up to 6 to Sat. hope somebody could help. i will appreciate any suggestions. thank you. A

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


    {
    int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int m,d,y,fh,h,f,i,jd=0,dow,j;
    clrscr();
    printf("Enter Month : ");
    scanf("%d",&m);
    printf("Enter the Year : ");
    scanf("%d",&y);
    /* To adjust 29 days for the Leap Year */
    if (y%4==0) month[2]=29;
    for(i=1;i< m; i++)
    jd=jd+month[i];
    jd=jd+1;
    dow=(jd+y+((y-1)/400)+((y-1)/4)-((y-1)/100))%7;
    printf(" Sat Sun Mon Tue Wed Thu Fri\n");
    for(j=0;j< dow;j++) printf("%4s");
    for(i=1;i< month[m]+1; i++)


    {
    printf("%4d",i);
    j=(j+1)%7;
    if(j==0) printf("\n");
    }
    getch();
    }

    try this.... naa man na daghan sa i-net wui..

  3. #3
    unsa mani oi....assignment.hahahaha

  4. #4
    same old-same old, you took your time posting in istorya, instead of searching for answer in Google? Be a responsible student, if you won't help yourself no one will.

  5. #5
    Quote Originally Posted by cencio View Post
    hi to all! im having a problem in my project in c programming. we are going to make a calendar program that would display the month and the dates of any given year and month. i already started doing it but stuck because i have problem setting the first day of the month. i relate 0 to Sun, 1 to Mon up to 6 to Sat. hope somebody could help. i will appreciate any suggestions. thank you. A
    You can't be a good programmer if you don't do it yourself. Always relying on someone's help, You treat yourself like a sissy. Be responsible student... actually that's a very easy problem.

  6. #6
    mao nang daghn mugradwar nga dli kamao...

  7. #7
    ..gi tagaan lage ug code..wahahaha..

    ..search bai..buhat imo code..ayaw salig sa uban..

  8. #8
    ScrapeBox Development softtouch's Avatar
    Join Date
    Jan 2004
    Gender
    Male
    Posts
    3,699
    Blog Entries
    1
    Almost 5 month old, and not a single response from the topic starter, I consider this thread as dead and with this its closed.

  9.    Advertisement

Similar Threads

 
  1. ~Help My Pet Is In Trouble! Need Advice~
    By bad donkey! in forum Pet Discussions
    Replies: 232
    Last Post: 11-17-2012, 08:37 AM
  2. HELP My GF told me 'Pang-chicks sa diha'
    By LionHeart in forum "Love is..."
    Replies: 121
    Last Post: 08-22-2011, 03:27 PM
  3. Help Again! My C Program not giving the desired output
    By marcdaven in forum Programming
    Replies: 7
    Last Post: 02-23-2010, 08:06 AM
  4. Replies: 81
    Last Post: 02-19-2010, 02:03 PM
  5. help: my vb9 program wont run
    By ingkiang in forum Programming
    Replies: 9
    Last Post: 07-28-2008, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top