Beecrowd URI Problem 1020 Age in Days Solution in C Language

Welcome to another solution of Beecrowd Beginner programming option.

Todays problrm name is Age in Days which is 1020 number problem in BEECROWD beginner section. I will provide herre the solutiom of thiis problem in C Language. If you really want the solution and solve Beecrowd 1020 problem  Age in Days, you can check out the C Language Solution from here.

Beecrowd URI Problem 1020 Age in Days Solution in C Language


URI BEECROWD 1020 Problem Age in Days Solution in C Language :


Beecrowd All Problem Solutions List


Beecrowd URI Problem 1020 Age in Days Solution in C Language


// Author: Rayhan Hosen Refat

#include <stdio.h>

int main()

{

    int a,y,m,d;

    scanf("%d",&a);

    y = a / 365 ;

    a %= 365 ;

    m = a / 30 ;

    d = a %= 30 ;

    printf("%d ano(s)\n", y);

    printf("%d mes(es)\n", m);

    printf("%d dia(s)\n", d);

    return 0;

}