#include <stdio.h>

int main()
{
    int i,t,m,y,x=0,t1,m1,t2,z;
    int ara[15]={31,28,30,31,30,31,30,31,30,31,30,31};

    scanf("%d%d%d",&t,&m,&y);

    for(i=0;i< m-1;i++) {
        x=x+ara[i];
    }

    z=x+t;
    printf("Day %d\n",z);
    t1=t+7;

    if (m==2) {
        t2=t1%28;
        m1=m+1;
        printf("After a week=%d-%d-%d\n",t2,m1,y);
    }

    if ((m==4 || m==6 || m==8 || m==10 || m==12) && t1>30){
        t2=t1%30;
        m1=m+1;
        printf("After a week= %d-%d-%d\n",t2,m1,y);
    }

    if ((m==1 || m==3 || m==5 || m==7 || m==11 || m==9) && t1>31){
        t2=t1%31;
        m1=m+1;
        printf("After a week= %d-%d-%d",t2,m1,y);
    }

    return 0;
}

প্রোগ্রামটি আর কোনোভাবে করা যাবে?

asked 25 Apr, 11:10

beginner%20level's gravatar image

beginner level
293

edited 25 Apr, 15:03

Mosharraf%20Hosain's gravatar image

Mosharraf Hosain ♦
23618

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×374

question asked: 25 Apr, 11:10

question was seen: 87 times

last updated: 25 Apr, 15:03