1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int days, years, weeks; printf("ÃÑ Àϼö¸¦ ÀÔ·ÂÇϽÿÀ: "); scanf("%d", &days); years = (days / 365); // ³â¼ö weeks = (days % 365) / 7; // ÁÖ¼ö days = days - ((years * 365) + (weeks * 7)); // ³²Àº Àϼö printf("%d³â ", years); printf("%dÁÖ ", weeks); printf("%dÀÏ \n", days); return 0; } | cs |