본문 바로가기

대학교 1-1/프논이

LAB2_3

교수님이 원하는 실행 결과:

LAB2_3실행결과

코드:

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main(void)
{
    int totalMinute = 130;
    int hour, minute;
    hour = totalMinute / 60;
    minute = totalMinute % 60;
 
    printf("%d분\n",totalMinute);
    printf("%dh %dm",hour,minute);
 
    return 0;
}
cs

간단한 연산,형식지정자

'대학교 1-1 > 프논이' 카테고리의 다른 글

HW2_2  (0) 2023.06.15
HW2_1  (0) 2023.06.15
LAB2_2  (0) 2023.06.15
LAB2_1  (0) 2023.06.15
HW1_1  (0) 2023.06.15