41223108 cp2023

  • Home
    • SMap
    • reveal
    • blog
  • About
  • 倉儲維護
    • s.cycu.org維護
    • windows維護
  • weekly progress
    • w1~4
    • w5
    • w6
    • w7
    • w9
    • w12
      • helloworld
      • GD繪圖程式1
    • W13
    • w15
  • ANSIC
    • 1.
    • 2.
    • 3.
    • 4.
    • 5.
    • 6.
    • 7.
    • 8.
    • 9.
    • 10.
  • NOTE
    • ssh
    • puttygen
  • 國旗練習
    • Thai
    • Laos
    • Bangladesh
    • vietnam
    • Italian
    • Russia
    • Belgium
    • Ukraine
    • Korea
  • 課程評分
  • Brython
  • setup
  • C_lib
  • replit
  • MSD
  • Final
6. << Previous Next >> 8.

7.

#include <stdio.h>

int main()
{
    int days, years, weeks;

    days = 10000; // Total number of days

    // Converts days to years, weeks and days
    years = days/365; // Calculate years
    weeks = (days % 365)/7; // Calculate weeks
    days = days - ((years*365) + (weeks*7)); // Calculate remaining days

    // Print the results
    printf("Years: %d\n", years);
    printf("Weeks: %d\n", weeks);
    printf("Days: %d \n", days);

    return 0;
}


6. << Previous Next >> 8.

Copyright © All rights reserved | This template is made with by Colorlib