bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / P015.c

P015.c (399B)


      1 /*WAP to accept number of days and
      2 display it after converting into
      3 number of years, months and days */
      4 
      5 #include<stdio.h>
      6 int main() {
      7 	int day, month, year, temp;
      8 	printf("Enter the number of days : ");
      9 	scanf("%d", &day);
     10 	temp = day;
     11 	year = day / 365;
     12 	day = day % 365;
     13 	month = day / 30;
     14 	day = day % 30;
     15 	printf("\n%d Days = %d Years %d Months %d Days", temp, year, month, day);
     16 	return 0;
     17 }