/*
1. 서로 다른 두 양의 정수 N, M 변수 선언하기
2. 양의 정수 두 개 입력받기
3. if문으로 큰 수와 작은 수 구별하여, 큰 수에서 작은 수 나눈고 몫과 나머지 출력
4. 몫과 나머지 줄 바꿈으로 출력하기
*/

#include <stdio.h>

int main() {
    int N, M;
    scanf("%d%d", &N, &M);
    if (N > M) {
        printf("%d\n", N / M);
        printf("%d", N % M);
    }
    else {
        printf("%d\n", M / N);
        printf("%d", M % N);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: