bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

APC-PRAC-005.c (575B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* WAP a program that accept number of days
      8 as input and represent it as years, months and days. */
      9 
     10 #include <stdio.h>
     11 int main()
     12 {
     13     int days, months, years, temp;
     14     printf("Enter the No. of days : ");
     15     scanf("%d", &days);
     16     temp = days;
     17     years = days / 365;
     18     days = days % 365;
     19     months = days / 30;
     20     days = days % 30;
     21     printf("%d Days = %d Years, %d Months, %d Days", temp, years, months, days);
     22     return 0;
     23 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror