알고리즘

[알고리즘] 백준 10474 - 분수좋아해? (C++)

blueberrysoda 2025. 2. 5. 23:53

[문제 링크] : https://www.acmicpc.net/problem/10474

#include <iostream>
using namespace std;

int main(){
    int A = 1, B = 1;

    while(true){
        cin >> A >> B;
        if(A == 0 && B == 0){
            break;
        }
        else{
            cout << A / B << " " << A % B << " / " << B << "\n";
        }
    }

    return 0;
}