Advertisement
KDOXG

Days to years — C programming

Jan 19th, 2018
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int f, g, h, j, q, w, e;
  6.     scanf("%d", &f);
  7.     g=f/365;
  8.     j=g/4;
  9.     q=f-j;
  10.     w=q/365;
  11.     e=q%365;
  12.     printf("%d years, %d days.", w, e);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement