| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define SEC_PER_MINUTE 60 // 1분은 60초 int main(void) { int input, minute, second; printf("초단위의 시간을 입력하시요:(32억초이하) "); scanf("%d", &input); // 초단위의 시간을 읽는다. minute = input / SEC_PER_MINUTE; // 몇 분 second = input % SEC_PER_MINUTE; // 몇 초 printf("%d초는 %d분 %d초입니다. \n", input, minute, second); return 0; } | cs |


https://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewCcoding/onlineCcoding.cgi?source=src/chap04/modulo.c
C프로그래밍(프로그래밍언어) 실습게시판