Created
April 15, 2021 12:06
-
-
Save btechmag/0240d0535754914dcf48b314b7dd52ae to your computer and use it in GitHub Desktop.
C program to convert specified days into years , weeks and days.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int days,weeks,years; | |
days=1329; | |
years=(days/365); | |
printf("\n years:%d \n",years); | |
weeks=(days%365)/7; | |
printf("\n weeks:%d \n",weeks); | |
days=days-((years365)+(weeks7)); | |
printf("\n days:%d \n",days); | |
getch(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment